axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r486067 - in /webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2: client/ description/ engine/
Date Tue, 12 Dec 2006 09:15:45 GMT
Author: keithc
Date: Tue Dec 12 01:15:44 2006
New Revision: 486067

URL: http://svn.apache.org/viewvc?view=rev&rev=486067
Log:
added a constant for endpoint
added endpoint property to msgContext so that we can identify the correct endpoint that the
request came to
edited the method that sets properties to options object

Modified:
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/client/Stub.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
    webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/client/Stub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/client/Stub.java?view=diff&rev=486067&r1=486066&r2=486067
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/client/Stub.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/client/Stub.java
Tue Dec 12 01:15:44 2006
@@ -214,9 +214,7 @@
     protected void addPropertyToOperationClient(OperationClient operationClient,
                                                 String propertyKey,
                                                 Object propertyValue){
-        Options options = new Options();
-        options.setProperty(propertyKey,propertyValue);
-        operationClient.setOptions(options);
+        operationClient.getOptions().setProperty(propertyKey,propertyValue);
     }
 
     protected void addPropertyToOperationClient(OperationClient operationClient,

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=486067&r1=486066&r2=486067
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
Tue Dec 12 01:15:44 2006
@@ -857,7 +857,6 @@
         if (WSDLConstants.WSDL20_2006Constants.NMTOKEN_ELEMENT.equals(messageContentModelName))
{
             elementQName = messageReference.getElementDeclaration().getName();
         } else if (WSDLConstants.WSDL20_2006Constants.NMTOKEN_ANY.equals(messageContentModelName))
{
-            // TODO : Need to improve this
            elementQName = Constants.XSD_ANY;
         } else
         if (WSDLConstants.WSDL20_2006Constants.NMTOKEN_NONE.equals(messageContentModelName))
{

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java?view=diff&rev=486067&r1=486066&r2=486067
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/description/WSDL2Constants.java
Tue Dec 12 01:15:44 2006
@@ -44,7 +44,8 @@
     String MESSAGE_LABEL = "messageLabel";
     String ATTRIBUTE_ELEMENT = "element";
 
-    String BINDING_LOCAL_NAME = "binding ";
+    String BINDING_LOCAL_NAME = "binding";
+    String ENDPOINT_LOCAL_NAME = "endpoint";
     String SOAP_BINDING_PREFIX = "SOAPBinding";
     String HTTP_PROTOCAL = "http://www.w3.org/2003/05/soap/bindings/HTTP";
     String SERVICE_LOCAL_NAME = "service";

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?view=diff&rev=486067&r1=486066&r2=486067
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
Tue Dec 12 01:15:44 2006
@@ -27,6 +27,7 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.WSDL2Constants;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
@@ -62,7 +63,7 @@
 
     public AxisService findService(MessageContext messageContext) throws AxisFault {
         EndpointReference toEPR = messageContext.getTo();
-        AxisService service = null;
+        AxisService axisService = null;
 
         if (toEPR != null) {
             if (toEPR.hasAnonymousAddress()) {
@@ -87,11 +88,18 @@
                 AxisConfiguration registry =
                         messageContext.getConfigurationContext().getAxisConfiguration();
 
-                return registry.getService(serviceName.getLocalPart());
+                axisService = registry.getService(serviceName.getLocalPart());
+
+                // If the axisService is not null we get the binding that the request came
to add
+                // add it as a property to the messageContext
+                if (axisService != null) {
+                    String endpointName = values[0].substring(values[0].indexOf(".")+1);
+                    messageContext.setProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME, endpointName);
+                }
             }
         }
 
-        return service;
+        return axisService;
     }
 
     public void initDispatcher() {

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java?view=diff&rev=486067&r1=486066&r2=486067
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/kernel/src/org/apache/axis2/engine/RequestURIBasedDispatcher.java
Tue Dec 12 01:15:44 2006
@@ -23,6 +23,7 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.WSDL2Constants;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -65,7 +66,16 @@
                 AxisConfiguration registry =
                         messageContext.getConfigurationContext().getAxisConfiguration();
 
-                return registry.getService(values[0]);
+                AxisService axisService = registry.getService(values[0]);
+
+                // If the axisService is not null we get the binding that the request came
to add
+                // add it as a property to the messageContext
+                if (axisService != null) {
+                    String endpointName = values[0].substring(values[0].indexOf(".")+1);
+                    messageContext.setProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME, endpointName);
+                }
+
+                return axisService;
             } else {
                 log.debug("Attempted to check for Service using target endpoint URI, but
the service fragment was missing");
                 return null;



---------------------------------------------------------------------
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