Author: mckierna
Date: Thu Jun 19 03:21:19 2008
New Revision: 669443

URL: http://svn.apache.org/viewvc?rev=669443&view=rev
Log:
See JIRA https://issues.apache.org/jira/browse/SANDESHA2-159

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

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java?rev=669443&r1=669442&r2=669443&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
 (original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/ApplicationMsgProcessor.java
 Thu Jun 19 03:21:19 2008
@@ -22,6 +22,7 @@
 import org.apache.axiom.soap.SOAPBody;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.context.ConfigurationContext;
@@ -249,7 +250,7 @@
                                                
if(!policy.isEnableMakeConnection()) {
                                                        String message = 
SandeshaMessageHelper.getMessage(SandeshaMessageKeys.makeConnectionDisabled);
                                                        throw new 
SandeshaException(message);
-                                               }                               
                
+                                               }
                                        }
                                }
                        }
@@ -388,7 +389,14 @@
                                                        // We have rewritten 
the replyTo. If this is the first message that we have needed to
                                                        // rewrite then we 
should set the sequence up for polling, and once we have saved the
                                                        // changes to the 
sequence then we can start the polling thread.
+                                                       
+                                                       //Firstly, we are going 
to use make connection in this configuration so we should now ensure that
+                                                       //WS-Adressing is 
enabled
+                                                       if 
(log.isDebugEnabled()) log.debug("Ensuring that WS-A is enabled for msg " + 
msgContext);
+                                                       
msgContext.setProperty(AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,Boolean.FALSE);
                                                        
msgContext.setReplyTo(newReplyTo);
+                                                       
+                                                       //start the polling 
process to pull back response messages
                                                        if 
(!rmsBean.isPollingMode()) {
                                                                
rmsBean.setPollingMode(true);
                                                                startPolling = 
true;

Modified: 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java?rev=669443&r1=669442&r2=669443&view=diff
==============================================================================
--- 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
 (original)
+++ 
webservices/sandesha/trunk/java/modules/core/src/main/java/org/apache/sandesha2/msgprocessors/SequenceProcessor.java
 Thu Jun 19 03:21:19 2008
@@ -231,12 +231,13 @@
                        EndpointReference acksTo = 
bean.getAcksToEndpointReference();
                        
                        // Send an Ack if needed.
-                       //We are not sending acks for duplicate messages in the 
RM 1.0 anon InOut case.
+                       //We are not sending acks for duplicate messages in the 
anon InOut case.
                        //If a standalone ack get sent before the actualy 
message (I.e. before the original msg get
                        //replied), the client may take this as a InOnly 
message and may avoid looking for the application
-                       //response.
-                       if 
(!(Sandesha2Constants.SPEC_VERSIONS.v1_0.equals(rmMsgCtx.getRMSpecVersion()) && 
-                                       
rmMsgCtx.getReplyTo().hasAnonymousAddress())) {
+                       //response if using replay.
+                       //Therefore we only send acks back in the anon InOnly 
case.
+                       if (WSDLConstants.MEP_CONSTANT_IN_ONLY == 
rmMsgCtx.getMessageContext().getAxisOperation().getAxisSpecificMEPConstant() && 
+                                       (replyTo==null || 
replyTo.getAddress()==null || replyTo.isWSAddressingAnonymous() )) {
                                sendAckIfNeeded(bean, sequenceId, rmMsgCtx, 
storageManager, true, acksTo.hasAnonymousAddress());        
                        }
                        



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

Reply via email to