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 ch...@apache.org on 2005/06/30 15:27:29 UTC

svn commit: r202555 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis/clientapi/ wsdl/src/org/apache/axis/wsdl/codegen/emitter/ wsdl/src/org/apache/axis/wsdl/template/java/

Author: chathura
Date: Thu Jun 30 06:27:28 2005
New Revision: 202555

URL: http://svn.apache.org/viewcvs?rev=202555&view=rev
Log:
detach() called explecitly inside the Generated MessageReceiver. Further a epr of the generated stuub mathod was made such that it allows url based dispatching.

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/MessageReceiverTemplate.xsl

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java?rev=202555&r1=202554&r2=202555&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/Stub.java Thu Jun 30 06:27:28 2005
@@ -49,7 +49,7 @@
     protected ConfigurationContext _configurationContext;
     protected static ServiceDescription _service;
     protected ServiceContext _serviceContext;
-    protected EndpointReference toEPR ;
+    protected String toEPR ;
 
 
 

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=202555&r1=202554&r2=202555&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Thu Jun 30 06:27:28 2005
@@ -143,7 +143,7 @@
             //write the call back handlers
             writeCallBackHandlers(axisBinding);
             //write the test classes
-            writeTestClasses(axisBinding);
+//            writeTestClasses(axisBinding);
             //write the databinding supporters
             writeDatabindingSupporters(axisBinding);
             //write a dummy implementation call for the tests to run.
@@ -368,7 +368,7 @@
             //write interface implementations
             writeServiceXml(axisBinding);
             //write the local test classes
-            writeLocalTestClasses(axisBinding);
+//            writeLocalTestClasses(axisBinding);
             //write a dummy implementation call for the tests to run.
             writeTestSkeletonImpl(axisBinding);
             //write a testservice.xml that will load the dummy skeleton impl for testing
@@ -485,11 +485,13 @@
         if(forTesting){
             addAttribute(doc,"package",configuration.getPackageName()+TEST_PACKAGE_NAME_SUFFIX, rootElement);
             addAttribute(doc,"name",localPart+TEST_SERVICE_CLASS_NAME_SUFFIX,rootElement);
+            addAttribute(doc,"servicename",localPart+TEST_SERVICE_CLASS_NAME_SUFFIX,rootElement);
         }else{
             addAttribute(doc,"package",configuration.getPackageName(), rootElement);
             addAttribute(doc,"name",localPart+SERVICE_CLASS_SUFFIX,rootElement);
+            addAttribute(doc,"servicename",localPart,rootElement);
         }
-        addAttribute(doc,"servicename",localPart+TEST_SERVICE_CLASS_NAME_SUFFIX,rootElement);
+        
         addAttribute(doc,"messagereceiver",localPart+MESSAGE_RECEIVER_SUFFIX,rootElement);
         fillSyncAttributes(doc, rootElement);
         loadOperations(boundInterface, doc, rootElement);

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=202555&r1=202554&r2=202555&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl Thu Jun 30 06:27:28 2005
@@ -38,7 +38,9 @@
         */
         public <xsl:value-of select="@name"/>(String axis2Home,String targetEndpoint) throws java.lang.Exception {
 
-           this.toEPR = new org.apache.axis.addressing.EndpointReference(org.apache.axis.addressing.AddressingConstants.WSA_TO,targetEndpoint);
+          if(targetEndpoint.charAt(targetEndpoint.length())!='/')
+        		targetEndpoint = targetEndpoint+"/";
+           this.toEPR = targetEndpoint;
 		    //creating the configuration
            _configurationContext = new org.apache.axis.context.ConfigurationContextFactory().buildClientConfigurationContext(axis2Home);
            _configurationContext.getAxisConfiguration().addService(_service);
@@ -76,7 +78,7 @@
 
 		    org.apache.axis.clientapi.Call _call = new org.apache.axis.clientapi.Call(_serviceContext);
  		    org.apache.axis.context.MessageContext _messageContext = getMessageContext();
-            _call.setTo(toEPR);
+            _call.setTo(new org.apache.axis.addressing.EndpointReference(org.apache.axis.addressing.AddressingConstants.WSA_TO, toEPR+"<xsl:value-of select="@name"/>"));
             _call.setSoapAction("<xsl:value-of select="$soapAction"/>");
             org.apache.axis.soap.SOAPEnvelope env = null;
             env = createEnvelope();
@@ -151,7 +153,7 @@
         public  void start<xsl:value-of select="@name"/>(<xsl:if test="$inputtype!=''"><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="$inputparam"></xsl:value-of>,</xsl:if>final <xsl:value-of select="$package"/>.<xsl:value-of select="$callbackname"/> callback) throws java.rmi.RemoteException{
              org.apache.axis.clientapi.Call _call = new org.apache.axis.clientapi.Call(_serviceContext);<!-- this needs to change -->
  		     org.apache.axis.context.MessageContext _messageContext = getMessageContext();
-             _call.setTo(toEPR);
+             _call.setTo(new org.apache.axis.addressing.EndpointReference(org.apache.axis.addressing.AddressingConstants.WSA_TO, toEPR+"<xsl:value-of select="@name"/>"));
             _call.setSoapAction("<xsl:value-of select="$soapAction"/>");
              org.apache.axis.soap.SOAPEnvelope env = createEnvelope();
              <xsl:choose>

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/MessageReceiverTemplate.xsl?rev=202555&r1=202554&r2=202555&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/MessageReceiverTemplate.xsl (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/MessageReceiverTemplate.xsl Thu Jun 30 06:27:28 2005
@@ -106,7 +106,7 @@
 				<xsl:when test="$style='doc'">
 				//doc style
 					<xsl:if test="$returntype!=''">
-						<xsl:value-of select="$returnvariable"/> =</xsl:if> skel.<xsl:value-of select="@name"/>(<xsl:if test="input/param/@type!=''">(<xsl:value-of select="input/param/@type"/>)<xsl:value-of select="$dbsupportpackage"/>.<xsl:value-of select="$dbsupportname"/>.fromOM((org.apache.axis.om.OMElement)msgContext.getEnvelope().getBody().getFirstChild(), <xsl:value-of select="input/param/@type"/>.class)</xsl:if>);
+						<xsl:value-of select="$returnvariable"/> =</xsl:if> skel.<xsl:value-of select="@name"/>(<xsl:if test="input/param/@type!=''">(<xsl:value-of select="input/param/@type"/>)<xsl:value-of select="$dbsupportpackage"/>.<xsl:value-of select="$dbsupportname"/>.fromOM((org.apache.axis.om.OMElement)msgContext.getEnvelope().getBody().getFirstChild().detach(), <xsl:value-of select="input/param/@type"/>.class)</xsl:if>);
 						
 					//Create a default envelop
 					envelope = getSOAPFactory().getDefaultEnvelope();