sandesha-dev@ws.apache.org
[Top] [All Lists]

svn commit: r670465 - /webservices/sandesha/trunk/java/modules/core/src/

Subject: svn commit: r670465 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
From:
Date: Mon, 23 Jun 2008 07:54:13 -0000
Author: mckierna
Date: Mon Jun 23 00:54:13 2008
New Revision: 670465

URL: http://svn.apache.org/viewvc?rev=670465&view=rev
Log:
CSeq use correct replyTo: http://issues.apache.org/jira/browse/SANDESHA2-163

Modified:
    
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java?rev=670465&r1=670464&r2=670465&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
 (original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java
 Mon Jun 23 00:54:13 2008
@@ -86,7 +86,8 @@
         * @throws SandeshaException
         */
        public static RMMsgContext createCreateSeqMsg(RMSBean rmsBean, 
RMMsgContext applicationRMMsg) throws AxisFault {
-
+               if(log.isDebugEnabled()) log.debug("Entry: 
RMMsgCreator::createCreateSeqMsg " + applicationRMMsg);
+               
                MessageContext applicationMsgContext = 
applicationRMMsg.getMessageContext();
                if (applicationMsgContext == null)
                        throw new 
SandeshaException(SandeshaMessageHelper.getMessage(SandeshaMessageKeys.appMsgIsNull));
@@ -126,6 +127,7 @@
                        else
                                addressingNamespace = 
AddressingConstants.Final.WSA_NAMESPACE;
                }
+               if(log.isDebugEnabled()) log.debug("RMMsgCreator:: addressing 
name space is " + addressingNamespace);
                
                // If acksTo has not been set, then default to anonymous, using 
the correct spec level
                EndpointReference acksToEPR = 
rmsBean.getAcksToEndpointReference();
@@ -142,6 +144,7 @@
                        Parameter p = 
service.getParameter(Sandesha2Constants.SERVICE_CONTAINS_OUT_IN_MEPS);
                        if(p != null && p.getValue() != null) {
                                twoWayService = ((Boolean) 
p.getValue()).booleanValue();
+                               if(log.isDebugEnabled()) 
log.debug("RMMsgCreator:: twoWayService " + twoWayService);
                        }
                }
                
@@ -201,15 +204,19 @@
                        throw new SandeshaException(message);
                }
                createSeqRMMsg.setTo(toEPR);
+               if(log.isDebugEnabled()) log.debug("RMMsgCreator:: toEPR=" + 
toEPR);
 
                EndpointReference replyToEPR = 
rmsBean.getReplyToEndpointReference();
                if(replyToEPR != null) {
                        replyToEPR = 
SandeshaUtil.getEPRDecorator(createSeqRMMsg.getConfigurationContext()).decorateEndpointReference(replyToEPR);
                        createSeqRMMsg.setReplyTo(replyToEPR);
+                       if(log.isDebugEnabled()) log.debug("RMMsgCreator:: 
replyToEPR=" + replyToEPR);
                }
+               
 
                AcksTo acksTo = new AcksTo(acksToEPR, rmNamespaceValue, 
addressingNamespace);
                createSequencePart.setAcksTo(acksTo);
+               if(log.isDebugEnabled()) log.debug("RMMsgCreator:: acksTo=" + 
acksTo);
                
                createSeqRMMsg.setCreateSequence(createSequencePart);
 
@@ -240,6 +247,7 @@
 
                createSeqRMMsg.addSOAPEnvelope();
                
+               if(log.isDebugEnabled()) log.debug("Entry: 
RMMsgCreator::createCreateSeqMsg " + createSeqRMMsg);
                return createSeqRMMsg;
        }
 
@@ -318,6 +326,8 @@
         */
        public static RMMsgContext createCreateSeqResponseMsg(RMMsgContext 
createSeqMessage, RMSequenceBean rmSequenceBean) throws AxisFault {
 
+               if(log.isDebugEnabled()) log.debug("Entry: 
RMMsgCreator::createCreateSeqResponseMsg " + rmSequenceBean);
+               
                CreateSequence cs = createSeqMessage.getCreateSequence();
                String namespace = createSeqMessage.getRMNamespaceValue();
 
@@ -328,6 +338,7 @@
 
                SequenceOffer offer = cs.getSequenceOffer();
                if (offer != null) {
+                       if(log.isDebugEnabled()) log.debug("RMMsgCreator:: " + 
offer);
                        String outSequenceId = 
offer.getIdentifer().getIdentifier();
 
                        if (outSequenceId != null && !"".equals(outSequenceId)) 
{
@@ -354,12 +365,18 @@
                String version = 
SpecSpecificConstants.getSpecVersionString(namespace);
                String action = 
SpecSpecificConstants.getCreateSequenceResponseAction(version);
 
-               return createResponseMsg(createSeqMessage, rmSequenceBean, 
response,
+               RMMsgContext returnRMContext = 
createResponseMsg(createSeqMessage, rmSequenceBean, response,
                                
Sandesha2Constants.MessageParts.CREATE_SEQ_RESPONSE,action);
+
+               returnRMContext.setTo(createSeqMessage.getReplyTo()); 
//CSResponse goes to the replyTo, NOT the acksTo
+               
+               if(log.isDebugEnabled()) log.debug("Exit: 
RMMsgCreator::createCreateSeqResponseMsg " + returnRMContext);
+               return returnRMContext;
        }
 
        public static RMMsgContext createTerminateSeqResponseMsg(RMMsgContext 
terminateSeqRMMsg, RMSequenceBean rmSequenceBean) throws AxisFault {
-        
+               if(log.isDebugEnabled())
+                       log.debug("Entry: 
RMMsgCreator::createTerminateSeqResponseMsg " + rmSequenceBean);        
                TerminateSequence terminateSequence = 
terminateSeqRMMsg.getTerminateSequence();
                String sequenceID = 
terminateSequence.getIdentifier().getIdentifier();
 
@@ -372,13 +389,21 @@
 
                String version = 
SpecSpecificConstants.getSpecVersionString(namespace);
                String action = 
SpecSpecificConstants.getTerminateSequenceResponseAction(version);
-
-               return createResponseMsg(terminateSeqRMMsg, rmSequenceBean, 
terminateSequenceResponse,
+               
+               RMMsgContext returnRMContext = 
createResponseMsg(terminateSeqRMMsg, rmSequenceBean, terminateSequenceResponse,
                                
Sandesha2Constants.MessageParts.TERMINATE_SEQ_RESPONSE, action);
+               if(rmSequenceBean.getAcksToEndpointReference()!=null){
+                       
returnRMContext.setTo(rmSequenceBean.getAcksToEndpointReference()); //RSP 
requirement
+               }
+               if(log.isDebugEnabled())
+                       log.debug("Exit: 
RMMsgCreator::createTerminateSeqResponseMsg " + returnRMContext);
+               return returnRMContext;
+               
        }
 
        public static RMMsgContext createCloseSeqResponseMsg(RMMsgContext 
closeSeqRMMsg, RMSequenceBean rmSequenceBean) throws AxisFault {
-
+               if(log.isDebugEnabled())
+                       log.debug("Entry: 
RMMsgCreator::createCloseSeqResponseMsg " + rmSequenceBean);
                CloseSequence closeSequence = closeSeqRMMsg.getCloseSequence();
                String sequenceID = 
closeSequence.getIdentifier().getIdentifier();
 
@@ -392,8 +417,14 @@
                String version = 
SpecSpecificConstants.getSpecVersionString(namespace);
                String action = 
SpecSpecificConstants.getCloseSequenceResponseAction(version);
 
-               return createResponseMsg(closeSeqRMMsg, rmSequenceBean, 
closeSequenceResponse,
+               RMMsgContext returnRMContext = createResponseMsg(closeSeqRMMsg, 
rmSequenceBean, closeSequenceResponse,
                                
Sandesha2Constants.MessageParts.CLOSE_SEQUENCE_RESPONSE, action);
+               if(rmSequenceBean.getAcksToEndpointReference()!=null){
+                       
returnRMContext.setTo(rmSequenceBean.getAcksToEndpointReference()); //RSP 
requirement
+               }
+               if(log.isDebugEnabled())
+                       log.debug("Exit: 
RMMsgCreator::createCloseSeqResponseMsg " + returnRMContext);
+               return returnRMContext;
        }
 
        /**
@@ -414,9 +445,6 @@
                MessageContext outMessage = 
MessageContextBuilder.createOutMessageContext (requestMsg.getMessageContext());
                RMMsgContext responseRMMsg = new RMMsgContext(outMessage);
                
-               if(rmSequenceBean.getAcksToEndpointReference()!=null){
-                       
responseRMMsg.setTo(rmSequenceBean.getAcksToEndpointReference());
-               }
                SOAPFactory factory = 
SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(requestMsg.getSOAPEnvelope()));
 
                String namespace = requestMsg.getRMNamespaceValue();



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@xxxxxxxxxxxxx
For additional commands, e-mail: sandesha-dev-help@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • svn commit: r670465 - /webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/util/RMMsgCreator.java, mckierna <=