You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2005/09/08 04:11:24 UTC

svn commit: r279484 - in /webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl: codegen/emitter/MultiLanguageClientEmitter.java template/java/InterfaceImplementationTemplate.xsl

Author: dims
Date: Wed Sep  7 19:11:21 2005
New Revision: 279484

URL: http://svn.apache.org/viewcvs?rev=279484&view=rev
Log:
Pick up wsa:Action from the wsdl (see sample below)

		<wsdl:operation name="GetXRay">
			<wsdl:input message="tns:IXRayLabService_GetXRay_InputMessage" wsa:Action="urn:hl7-org:v3:GetXRay" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
			<wsdl:output message="tns:IXRayLabService_GetXRay_OutputMessage" wsa:Action="http://tempuri.org/IXRayLabService/GetXRayResponse" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
		</wsdl:operation>




Modified:
    webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=279484&r1=279483&r2=279484&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Wed Sep  7 19:11:21 2005
@@ -604,6 +604,11 @@
             addAttribute(doc, "type", typeMappingStr, param);
             //add this as a body parameter
             addAttribute(doc,"location","body",param);
+            Iterator iter = inputMessage.getExtensibilityAttributes().iterator();
+            while(iter.hasNext()){
+                WSDLExtensibilityAttribute att = (WSDLExtensibilityAttribute) iter.next();
+                addAttribute(doc, att.getKey().getLocalPart(), att.getValue().toString(), param);
+            }
         }else{
             param = null;
         }

Modified: webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=279484&r1=279483&r2=279484&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Wed Sep  7 19:11:21 2005
@@ -93,6 +93,7 @@
  		    org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
             _call.setTo(this.toEPR);
             _call.setSoapAction("<xsl:value-of select="$soapAction"/>");
+            <xsl:for-each select="input/param[@Action!='']">_messageContext.setWSAAction("<xsl:value-of select="@Action"/>");</xsl:for-each>
 
              //set the properties
             populateProperties(_call);
@@ -152,7 +153,7 @@
                return;
               </xsl:when>
               <xsl:otherwise>
-             //set the exception throwing status     
+             //set the exception throwing status
              _call.setExceptionToBeThrownOnSOAPFault(true);
              org.apache.axis2.context.MessageContext  _returnMessageContext = _call.invokeBlocking(_operations[<xsl:value-of select="position()-1"/>], _messageContext);
              org.apache.axis2.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
@@ -180,8 +181,10 @@
 
              org.apache.axis2.clientapi.Call _call = new org.apache.axis2.clientapi.Call(_serviceContext);
  		     org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
-             _call.setTo(this.toEPR);
+            _call.setTo(this.toEPR);
             _call.setSoapAction("<xsl:value-of select="$soapAction"/>");
+            <xsl:for-each select="input/param[@Action!='']">_messageContext.setWSAAction("<xsl:value-of select="@Action"/>");</xsl:for-each>
+
              org.apache.axis2.soap.SOAPEnvelope env = createEnvelope();
              <xsl:choose>
              <!-- There are more than 1 parameter in the input-->
@@ -231,7 +234,7 @@
              _messageContext.setEnvelope(env);
              <xsl:choose>
              <xsl:when test="$outputtype=''">
-              //Nothing to pass as the callback!!!   
+              //Nothing to pass as the callback!!!
               _call.invokeNonBlocking(_operations[<xsl:value-of select="position()-1"/>], _messageContext,null);
               </xsl:when>
               <xsl:otherwise>
@@ -266,7 +269,9 @@
  		    org.apache.axis2.context.MessageContext _messageContext = getMessageContext();
             _call.setTo(this.toEPR);
             _call.setSoapAction("<xsl:value-of select="$soapAction"/>");
-            org.apache.axis2.soap.SOAPEnvelope env = null;
+            <xsl:for-each select="input/param[@Action!='']">_messageContext.setWSAAction("<xsl:value-of select="@Action"/>");</xsl:for-each>
+
+          org.apache.axis2.soap.SOAPEnvelope env = null;
             env = createEnvelope();
             <xsl:choose>
             <!-- test the number of input parameters