axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r478599 - in /webservices/axis2/trunk/java/modules/addressing: src/org/apache/axis2/handlers/addressing/AddressingInHandler.java test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
Date Thu, 23 Nov 2006 15:31:31 GMT
Author: davidillsley
Date: Thu Nov 23 07:31:30 2006
New Revision: 478599

URL: http://svn.apache.org/viewvc?view=rev&rev=478599
Log:
Add check to AddressingInHandler so that the SOAPAction header is only checked when messageContext.isServerSide()
is true.

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?view=diff&rev=478599&r1=478598&r2=478599
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
Thu Nov 23 07:31:30 2006
@@ -305,8 +305,13 @@
         if(log.isTraceEnabled()){
             log.trace("extractActionInformation: soapAction='"+soapAction+"' wsa:Action='"+wsaAction+"'");
         }
-        
-        if (soapAction != null && !"".equals(soapAction)) {
+        // The isServerSide check is because the underlying Options object is
+        // shared between request and response MessageContexts for Sync
+        // invocations. If the soapAction is set outbound and a wsa:Action is
+        // received on the response they will differ (because there is no
+        // SOAPAction header on an HTTP response). In this case we should not
+        // check that soapAction==wsa:Action
+        if (soapAction != null && !"".equals(soapAction) && messageContext.isServerSide())
{
             if (!soapAction.equals(wsaAction)) {
                 AddressingFaultsHelper.triggerActionMismatchFault(messageContext);
             }

Modified: webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java?view=diff&rev=478599&r1=478598&r2=478599
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/test/org/apache/axis2/handlers/addressing/AddressingFinalInHandlerTest.java
Thu Nov 23 07:31:30 2006
@@ -187,7 +187,7 @@
     public void testDifferentSoapActionProcessing() {
         String testfile = "valid-messages/"+versionDirectory+"/soapmessage.xml";
         MessageContext mc = new MessageContext();
-        
+        mc.setServerSide(true); 
         try {
             mc.setSoapAction("http://ws.apache.org/tests/differentAction");
             basicExtractAddressingInformationFromHeaders(testfile, mc);
@@ -206,7 +206,7 @@
     public void testSameSoapAction() {
         String testfile = "valid-messages/"+versionDirectory+"/soapmessage.xml";
         MessageContext mc = new MessageContext();
-        
+        mc.setServerSide(true);
         try {
             mc.setSoapAction("http://ws.apache.org/tests/action");
             basicExtractAddressingInformationFromHeaders(testfile, mc);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message