ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r382725 - in /webservices/axis2/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/util/ integration/test/org/apache/axis2/rpc/
Date Fri, 03 Mar 2006 08:40:05 GMT
Author: chinthaka
Date: Fri Mar  3 00:40:03 2006
New Revision: 382725

URL: http://svn.apache.org/viewcvs?rev=382725&view=rev
Log:
Fixing the build due to the latest changes in addressing. Some more fixes to come.

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingInHandler.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- 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
Fri Mar  3 00:40:03 2006
@@ -54,6 +54,7 @@
 
         // if there are no headers or addressing version is already determined, pass through
         if (header == null || msgContext.getProperty(WS_ADDRESSING_VERSION) != null) {
+            msgContext.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.TRUE);
             return;
         }
 
@@ -63,13 +64,12 @@
         addressingHeaders = header.getHeaderBlocksWithNSURI(addressingNamespace);
         if (addressingHeaders != null && addressingHeaders.size() > 0) {
             msgContext.setProperty(WS_ADDRESSING_VERSION, addressingNamespace);
+            msgContext.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.FALSE);
             addressingNSObject = ((OMElement) addressingHeaders.get(0)).findNamespace(addressingNamespace,
"");
             logger.debug(addressingVersion + " Headers present in the SOAP message. Starting
to process ...");
-            extractAddressingInformation(header, msgContext,
-                    addressingHeaders, addressingNamespace);
-
-
+            extractAddressingInformation(header, msgContext, addressingHeaders, addressingNamespace);
         } else {
+            msgContext.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.TRUE);
             logger.debug("No Headers present corresponding to " + addressingVersion);
         }
 

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Fri Mar  3 00:40:03 2006
@@ -56,10 +56,16 @@
         // it should be able to disable addressing by some one.
         Boolean
                 property = (Boolean) msgContext.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+        if (property == null && msgContext.getOperationContext() != null) {
+            // check in the IN message context, if available
+            MessageContext inMsgCtxt = msgContext.getOperationContext().getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+            property = (Boolean) inMsgCtxt.getProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES);
+        }
         if (property != null && property.booleanValue()) {
             log.info("Addressing is disbaled .....");
             return;
         }
+
         this.msgCtxt = msgContext;
 
         Object addressingVersionFromCurrentMsgCtxt = msgContext.getProperty(WS_ADDRESSING_VERSION);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/Options.java Fri
Mar  3 00:40:03 2006
@@ -131,7 +131,7 @@
 
     public EndpointReference getFrom() {
         if (from == null && parent != null) {
-           return parent.getFrom();
+            return parent.getFrom();
         }
         return from;
     }
@@ -295,6 +295,16 @@
     }
 
     public void setAction(String action) {
+        // setting addressing back on. This does not mean anything if addressing is engaged.
+        // this is working only if addressing is engaged, as one might already set this off.
+        // see ServiceClient(ConfigurationContext,AxisService).
+
+        // first check whether this is a "probable" URI. Well the best thing to do is to
use the URI
+        // class itself. But its kinda slow, using a lazy method here
+        if (action != null && action.indexOf(":") != -1) {
+            this.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.FALSE);
+        }
+
         this.action = action;
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
Fri Mar  3 00:40:03 2006
@@ -1,11 +1,22 @@
 package org.apache.axis2.client;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
-import org.apache.axis2.context.*;
-import org.apache.axis2.description.*;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.AxisServiceGroup;
+import org.apache.axis2.description.ClientUtils;
+import org.apache.axis2.description.OutInAxisOperation;
+import org.apache.axis2.description.OutOnlyAxisOperation;
+import org.apache.axis2.description.RobustOutOnlyAxisOperation;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.ListenerManager;
 import org.apache.axis2.i18n.Messages;
@@ -96,6 +107,12 @@
         ServiceGroupContext sgc = new ServiceGroupContext(this.configContext,
                 (AxisServiceGroup) this.axisService.getParent());
         this.serviceContext = sgc.getServiceContext(this.axisService);
+
+        // if we are using anon case then we can not use addressing, as WS-A requires both
+        // Action and To address to be present. In anon case, we might not have the action.
+        // so switching addressing off now. But will be setting back on, if some one sets
the action.
+        // @see Options.setAction()
+        if (axisService == null) serviceContext.setProperty(Constants.Configuration.DISABLE_ADDRESSING_FOR_OUT_MESSAGES,
Boolean.TRUE);
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/util/Utils.java Fri Mar
 3 00:40:03 2006
@@ -76,6 +76,7 @@
 
         newmsgCtx.setMessageID(UUIDGenerator.getUUID());
         newmsgCtx.setTo(oldOptions.getReplyTo());
+        newmsgCtx.getOptions().setAction(oldOptions.getAction());
 
         // add the service group id as a reference parameter
         String serviceGroupContextId = inMessageContext.getServiceGroupContextId();

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=382725&r1=382724&r2=382725&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
Fri Mar  3 00:40:03 2006
@@ -61,10 +61,7 @@
     //  0123456789 0 123456789
 
 
-    protected EndpointReference targetEPR =
-            new EndpointReference("http://127.0.0.1:"
-                    + (UtilServer.TESTING_PORT)
-                    + "/axis2/services/EchoXMLService/concat");
+    protected EndpointReference targetEPR;
     protected Log log = LogFactory.getLog(getClass());
     protected QName serviceName = new QName("EchoXMLService");
     protected QName operationName = new QName("http://org.apache.axis2/xsd", "concat");



Mime
View raw message