ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r202369 - in /webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl: codegen/emitter/MultiLanguageClientEmitter.java template/general/ServiceXMLTemplate.xsl
Date Wed, 29 Jun 2005 13:16:36 GMT
Author: ajith
Date: Wed Jun 29 06:16:34 2005
New Revision: 202369

URL: http://svn.apache.org/viewcvs?rev=202369&view=rev
Log:
Added the generated message receiver to the service xml

Modified:
    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/general/ServiceXMLTemplate.xsl

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=202369&r1=202368&r2=202369&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
Wed Jun 29 06:16:34 2005
@@ -280,7 +280,6 @@
      */
     protected void writeServiceXml(WSDLBinding axisBinding) throws Exception {
         if (this.configuration.isGenerateDeployementDescriptor()){
-            //Note -  One can generate the service xml using the interface XML
             XmlDocument skeletonModel = createDOMDocuementForServiceXML(axisBinding, false);
             ClassWriter serviceXmlWriter = new ServiceXMLWriter(this.configuration.getOutputLocation(),
                     this.configuration.getOutputLanguage()
@@ -474,14 +473,16 @@
 
         XmlDocument doc = new XmlDocument();
         Element rootElement = doc.createElement("interface");
+        String localPart = boundInterface.getName().getLocalPart();
         if(forTesting){
             addAttribute(doc,"package",configuration.getPackageName()+TEST_PACKAGE_NAME_SUFFIX,
rootElement);
-            addAttribute(doc,"name",boundInterface.getName().getLocalPart()+TEST_SERVICE_CLASS_NAME_SUFFIX,rootElement);
+            addAttribute(doc,"name",localPart+TEST_SERVICE_CLASS_NAME_SUFFIX,rootElement);
         }else{
             addAttribute(doc,"package",configuration.getPackageName(), rootElement);
-            addAttribute(doc,"name",boundInterface.getName().getLocalPart()+SERVICE_CLASS_SUFFIX,rootElement);
+            addAttribute(doc,"name",localPart+SERVICE_CLASS_SUFFIX,rootElement);
         }
-        addAttribute(doc,"servicename",boundInterface.getName().getLocalPart()+TEST_SERVICE_CLASS_NAME_SUFFIX,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);
         doc.appendChild(rootElement);
@@ -496,8 +497,9 @@
         XmlDocument doc = new XmlDocument();
         Element rootElement = doc.createElement("interface");
         addAttribute(doc,"package",configuration.getPackageName(), rootElement);
-        addAttribute(doc,"name",boundInterface.getName().getLocalPart()+MESSAGE_RECEIVER_SUFFIX,rootElement);
-        addAttribute(doc,"skeletonname",boundInterface.getName().getLocalPart() + SERVICE_CLASS_SUFFIX,rootElement);
+        String localPart = boundInterface.getName().getLocalPart();
+        addAttribute(doc,"name",localPart+MESSAGE_RECEIVER_SUFFIX,rootElement);
+        addAttribute(doc,"skeletonname",localPart + SERVICE_CLASS_SUFFIX,rootElement);
         addAttribute(doc, "basereceiver", "org.apache.axis.receivers.AbstractInOutSyncMessageReceiver",
rootElement);
         addAttribute(doc,"dbsupportpackage",configuration.getPackageName()+DATABINDING_PACKAGE_NAME_SUFFIX,rootElement);
         fillSyncAttributes(doc, rootElement);

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/general/ServiceXMLTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/general/ServiceXMLTemplate.xsl?rev=202369&r1=202368&r2=202369&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/general/ServiceXMLTemplate.xsl
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/general/ServiceXMLTemplate.xsl
Wed Jun 29 06:16:34 2005
@@ -1,17 +1,29 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
     <xsl:template match="/interface">
+    <xsl:variable name="receiver"><xsl:value-of select="@messagereceiver"/></xsl:variable>
+    <xsl:variable name="package"><xsl:value-of select="@package"/></xsl:variable>
+
     <xsl:comment>Auto generated Axis Service XML</xsl:comment>
     <service><xsl:attribute name="name"><xsl:value-of select="@servicename"/></xsl:attribute>
     <parameter name="ServiceClass" locked="xsd:false">
-        <xsl:choose>
-            <xsl:when test="@package=''"><xsl:value-of select="@name"/></xsl:when>
-            <xsl:otherwise> <xsl:value-of select="@package"/>.<xsl:value-of
select="@name"/></xsl:otherwise>
+         <xsl:choose>
+            <xsl:when test="$package=''"><xsl:value-of select="@name"/></xsl:when>
+            <xsl:otherwise> <xsl:value-of select="$package"/>.<xsl:value-of
select="@name"/></xsl:otherwise>
         </xsl:choose>
        </parameter>
     <xsl:for-each select="method">
          <xsl:comment>Mounting the method <xsl:value-of select="@name"/> </xsl:comment>
-         <operation><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute></operation>
+         <operation><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
+             <xsl:if test="$receiver!=''">
+             <messageReceiver>
+              <xsl:choose>
+                    <xsl:when test="$package=''"><xsl:attribute name="class"><xsl:value-of
select="$receiver"/></xsl:attribute></xsl:when>
+                    <xsl:otherwise><xsl:attribute name="class"><xsl:value-of
select="$package"/>.<xsl:value-of select="$receiver"/></xsl:attribute></xsl:otherwise>
+              </xsl:choose>
+              </messageReceiver>
+            </xsl:if>
+         </operation>
      </xsl:for-each>
     </service>
     </xsl:template>



Mime
View raw message