Author: mckierna
Date: Wed Jan 23 11:36:07 2008
New Revision: 614635

URL: http://svn.apache.org/viewvc?rev=614635&view=rev
Log:
SANDESHA2-135 Offers not being sent for RM 1.0 two way MEP's

Modified:
    
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
    
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java?rev=614635&r1=614634&r2=614635&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
 (original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/SandeshaModule.java
 Wed Jan 23 11:36:07 2008
@@ -261,9 +261,8 @@
                                String name = null;
                                QName qName = op.getName();
                                if(qName != null) name = qName.getLocalPart();
-                               if((name != null && 
name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) ||
-                                  ServiceClient.ANON_OUT_IN_OP.equals(qName))
-                                       break;
+                               if((name != null && 
name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)))
+                                       continue;
 
                                // If we get to here then we must have one of 
the user's operations, so
                                // check the MEP.
@@ -280,9 +279,7 @@
                        String name = null;
                        QName qName = op.getName();
                        if(qName != null) name = qName.getLocalPart();
-                       if((name != null && 
!name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX)) &&
-                          !ServiceClient.ANON_OUT_IN_OP.equals(qName)) {
-
+                       if((name != null && 
!name.startsWith(Sandesha2Constants.SANDESHA_OP_PREFIX))) {
                                // If we get to here then we must have one of 
the user's operations, so
                                // check the MEP.
                                if(op.getAxisSpecificMEPConstant() == 
WSDLConstants.MEP_CONSTANT_OUT_IN) {

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java?rev=614635&r1=614634&r2=614635&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
 (original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/CreateSeqMsgProcessor.java
 Wed Jan 23 11:36:07 2008
@@ -25,6 +25,7 @@
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
@@ -173,9 +174,9 @@
                                // offered seq id
                                String offeredSequenceID = 
offer.getIdentifer().getIdentifier(); 
                                
-                               boolean offerEcepted = 
offerAccepted(offeredSequenceID, context, createSeqRMMsg, storageManager);
+                               boolean offerAccepted = 
offerAccepted(offeredSequenceID, context, createSeqRMMsg, storageManager);
        
-                               if (offerEcepted) {
+                               if (offerAccepted) {
                                        // Setting the CreateSequence table 
entry for the outgoing
                                        // side.
                                        RMSBean rMSBean = new RMSBean();
@@ -185,9 +186,18 @@
                                        
rMSBean.setInternalSequenceID(outgoingSideInternalSequenceId);
                                        // this is a dummy value
                                        
rMSBean.setCreateSeqMsgID(SandeshaUtil.getUUID()); 
-                                               
-                                       
rMSBean.setToEndpointReference(rmdBean.getToEndpointReference());
-                                       
rMSBean.setAcksToEndpointReference(rmdBean.getToEndpointReference());  // The 
acks need to flow back into this endpoint
+                                       
+                                       if(rmdBean.getToEndpointReference() != 
null){
+                                               
rMSBean.setToEndpointReference(rmdBean.getToEndpointReference());
+                                       } else {
+                                               //It's Sync2Way so set to 
address to anonymous when spec 1.0 is used
+                                               String specVersion = 
rmdBean.getRMVersion();
+                                               if 
(Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(specVersion)) {
+                                                       
rMSBean.setToEndpointReference(new 
EndpointReference(AddressingConstants.Submission.WSA_ANONYMOUS_URL));
+                                               }       
+                                       }
+                                       
+                                       
rMSBean.setAcksToEndpointReference(rmdBean.getReplyToEndpointReference());  // 
The acks need to flow back into this endpoint
                                        
rMSBean.setReplyToEndpointReference(rmdBean.getReplyToEndpointReference());
                                        
rMSBean.setLastActivatedTime(System.currentTimeMillis());
                                        
rMSBean.setRMVersion(rmdBean.getRMVersion());



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to