axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r514971 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/general/ kernel/src/org/apache/axis2/description/ kernel/src/org/apache/axis2/dispatchers/ kernel/src/org/apache/axis2/engine/
Date Tue, 06 Mar 2007 03:39:03 GMT
Author: amilas
Date: Mon Mar  5 19:39:02 2007
New Revision: 514971

URL: http://svn.apache.org/viewvc?view=rev&rev=514971
Log:
Changed the bodybased dispatcher to always get the operation from the input message to operation
map.
in this way we can handle both rpc and doc literal cases in same way. but keep the old operation
name base technique 
as well to support some senarios which uses the rpc message receiver.
Added the useoriginal parameter to generated service.xml (in codegen) to show the orginal
wasl.

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/ServiceXMLTemplate.xsl
Mon Mar  5 19:39:02 2007
@@ -42,7 +42,9 @@
                     </xsl:otherwise>
                 </xsl:choose>
             </parameter>
-			<xsl:for-each select="method">
+            <parameter name="useOriginalwsdl" locked="false">true</parameter>
+            <parameter name="modifyUserWSDLPortAddress" locked="false">true</parameter>
+            <xsl:for-each select="method">
 				<operation>
 					<xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
 					<xsl:attribute name="mep"><xsl:value-of select="@mepURI"/></xsl:attribute>

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
Mon Mar  5 19:39:02 2007
@@ -2314,7 +2314,17 @@
      */
     public void addMessageElementQNameToOperationMapping(QName messageElementQName,
                                                          AxisOperation operation) {
-        messageElementQNameToOperationMap.put(messageElementQName, operation);
+        // when setting an operation we have to set it only if the messegeElementQName does
not
+        // exists in the map.
+        // does exists means there are two or more operations which has the same input element
(in doc/literal
+        // this is possible. In this case better to set it as null without giving
+        // a random operation.
+        if (messageElementQNameToOperationMap.containsKey(messageElementQName)){
+            messageElementQNameToOperationMap.put(messageElementQName,null);
+        } else {
+            messageElementQNameToOperationMap.put(messageElementQName, operation);
+        }
+
     }
 
     public String getEndpointURL() {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
Mon Mar  5 19:39:02 2007
@@ -819,6 +819,9 @@
             // the list and add it - the name for this is just the
             message.setElementQName((QName) resolvedRpcWrappedElementMap
                     .get(rpcOperationName));
+            ((AxisService)message.getParent().getParent()).addMessageElementQNameToOperationMapping(
+                    (QName)resolvedRpcWrappedElementMap.get(rpcOperationName),
+                            (AxisOperation)message.getParent());
         } else {
             // now we are sure this is an document literal type element
             List bindingPartsList = getPartsListFromSoapBody(extensibilityElements);
@@ -1879,7 +1882,7 @@
                 }
 
                 String soapAction = soapOperation.getSoapActionURI();
-                if (soapAction != null) {
+                if ((soapAction != null) && (!soapAction.equals(""))) {
                     axisBindingOperation.setProperty(WSDL2Constants.ATTR_WSOAP_ACTION, soapAction);
                     axisBindingOperation.getAxisOperation().setSoapAction(soapAction);
                     axisService.mapActionToOperation(soapAction,
@@ -2132,7 +2135,6 @@
             } else if (extElements.get(i) instanceof HTTPBinding) {
                 isHttpBinding = true;
                 this.bindingType = BINDING_TYPE_HTTP;
-            
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20DefaultValueHolder.java
Mon Mar  5 19:39:02 2007
@@ -33,7 +33,7 @@
     static {
         defaultValuesMap.put(WSDL2Constants.ATTR_WSOAP_VERSION,
                              SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
-        defaultValuesMap.put(WSDL2Constants.ATTR_WSOAP_ACTION, "");
+        defaultValuesMap.put(WSDL2Constants.ATTR_WSOAP_ACTION, "\\\"\\\"");
         defaultValuesMap.put(WHTTP_METHOD_WSDLX_SAFE,
                              org.apache.axis2.Constants.Configuration.HTTP_METHOD_GET);
         defaultValuesMap.put(WHTTP_METHOD_WSDLX_SAFE,

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcher.java
Mon Mar  5 19:39:02 2007
@@ -36,7 +36,6 @@
      */
     public AxisService findService(MessageContext messageContext) throws AxisFault {
         EndpointReference toEPR = messageContext.getTo();
-
         if (toEPR != null) {
             if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
                 log.debug(messageContext.getLogIDString() +

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java?view=diff&rev=514971&r1=514970&r2=514971
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/SOAPMessageBodyBasedDispatcher.java
Mon Mar  5 19:39:02 2007
@@ -46,27 +46,20 @@
 
     public AxisOperation findOperation(AxisService service, MessageContext messageContext)
             throws AxisFault {
-        QName operationName;
 
         OMElement bodyFirstChild = messageContext.getEnvelope().getBody().getFirstElement();
 
-        if (bodyFirstChild == null) {
-            return null;
-        } else {
-            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-                log.debug(messageContext.getLogIDString() +
-                        " Checking for Operation using SOAP message body's first child's
local name : "
-                        + bodyFirstChild.getLocalName());
-            }
-            operationName = new QName(bodyFirstChild.getLocalName());
-        }
+        AxisOperation axisOperation = null;
+        if (bodyFirstChild != null){
+           axisOperation = service.getOperationByMessageElementQName(bodyFirstChild.getQName());
 
-        AxisOperation axisOperation = service.getOperation(operationName);
+           // this is required for services uses the RPC message receiver
+           if (axisOperation == null){
+               QName operationName = new QName(bodyFirstChild.getLocalName());
+               axisOperation = service.getOperation(operationName);
+           }
 
-        if (axisOperation == null) {
-            axisOperation = service.getOperationByMessageElementQName(bodyFirstChild.getQName());
         }
-
         return axisOperation;
     }
 



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