ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r179760 - in /webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl: codegen/emitter/MultiLanguageClientEmitter.java template/general/ServiceXMLTemplate.xsl template/java/TestClassTemplate.xsl
Date Fri, 03 Jun 2005 09:48:23 GMT
Author: chathura
Date: Fri Jun  3 02:48:21 2005
New Revision: 179760

URL: http://svn.apache.org/viewcvs?rev=179760&view=rev
Log:
Test case auto generation is edited to setup a http simple Axis server and templates changed
to code gen it accordingly.

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
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/TestClassTemplate.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=179760&r1=179759&r2=179760&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
Fri Jun  3 02:48:21 2005
@@ -74,6 +74,7 @@
     private static final String CALL_BACK_HANDLER_SUFFIX = "CallbackHandler";
     private static final String STUB_SUFFIX = "Stub";
     private static final String TEST_SUFFIX = "Test";
+    private static final String SERVICE_CLASS_SUFFIX ="Skeleton";
 
     protected InputStream xsltStream = null;
     protected CodeGenConfiguration configuration;
@@ -353,8 +354,12 @@
 
         XmlDocument doc = new XmlDocument();
         Element rootElement = doc.createElement("interface");
-        addAttribute(doc,"package",configuration.getPackageName(),rootElement);
-        addAttribute(doc,"name",boundInterface.getName().getLocalPart(),rootElement);
+        addAttribute(doc,"package",configuration.getPackageName(), rootElement);
+        if(this.configuration.isServerSide()){
+        	addAttribute(doc,"name",boundInterface.getName().getLocalPart()+SERVICE_CLASS_SUFFIX,rootElement);
+        }else{
+        	addAttribute(doc,"name",boundInterface.getName().getLocalPart(),rootElement);
+        }
         addAttribute(doc,"callbackname",boundInterface.getName().getLocalPart() + CALL_BACK_HANDLER_SUFFIX,rootElement);
         fillSyncAttributes(doc, rootElement);
         loadOperations(boundInterface, doc, rootElement);
@@ -399,12 +404,12 @@
         addAttribute(doc,"name",localPart+TEST_SUFFIX,rootElement);
         addAttribute(doc,"namespace",boundInterface.getName().getNamespaceURI(),rootElement);
         addAttribute(doc,"interfaceName",localPart,rootElement);
+        addAttribute(doc, "servicename", boundInterface.getName().getLocalPart()+SERVICE_CLASS_SUFFIX,
rootElement);
         addAttribute(doc,"callbackname",localPart + CALL_BACK_HANDLER_SUFFIX,rootElement);
         addAttribute(doc,"stubname",localPart + STUB_SUFFIX,rootElement);
         fillSyncAttributes(doc, rootElement);
         loadOperations(boundInterface, doc, rootElement);
         doc.appendChild(rootElement);
-
         return doc;
 
     }

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=179760&r1=179759&r2=179760&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
Fri Jun  3 02:48:21 2005
@@ -1,8 +1,8 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-    <xsl:output method="xml" indent="yes"/>
+    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
     <xsl:template match="/interface">
     <xsl:comment>Auto generated Axis Service XML</xsl:comment>
-    <service name="">
+    <service><xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
     <parameter name="ServiceClass" locked="xsd:false"><xsl:value-of select="@package"/>.<xsl:value-of
select="@name"/></parameter>
     <xsl:for-each select="method">
          <xsl:comment>Mounting the method <xsl:value-of select="@name"/> </xsl:comment>

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/TestClassTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/TestClassTemplate.xsl?rev=179760&r1=179759&r2=179760&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/TestClassTemplate.xsl
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/TestClassTemplate.xsl
Fri Jun  3 02:48:21 2005
@@ -7,6 +7,7 @@
     <xsl:variable name="stubname"><xsl:value-of select="@stubname"/></xsl:variable>
     <xsl:variable name="isSync"><xsl:value-of select="@isSync"/></xsl:variable>
     <xsl:variable name="isAsync"><xsl:value-of select="@isAsync"/></xsl:variable>
+    <xsl:variable name="servicename"><xsl:value-of select="@servicename"/></xsl:variable>
     package <xsl:value-of select="$package"/>;
     
 	import java.io.InputStream;
@@ -41,8 +42,6 @@
 			ClassLoader cl = Thread.currentThread().getContextClassLoader();
 			InputStream in = cl
 					.getResourceAsStream("com/datatransferhsbc/service.xml");
-			//InputStream in = new FileInputStream(new
-			// File("/src/com/datatransferhsbc/service.xml"));
 			ServiceDescription service = new ServiceDescription();
 			deploymentEngine.buildService(service, in, classLoader);
 			
@@ -88,7 +87,7 @@
          */
         public  void test<xsl:value-of select="@name"/>() throws java.lang.Exception{
 
-        <xsl:value-of select="$stubname"/> stub = new <xsl:value-of select="$package"/>.<xsl:value-of
select="$stubname"/>();
+        <xsl:value-of select="$stubname"/> stub = new <xsl:value-of select="$package"/>.<xsl:value-of
select="$stubname"/>(".","http://localhost:5050/services/<xsl:value-of select="$servicename"/>/<xsl:value-of
select="@name"/>");
            <xsl:choose>
              <xsl:when test="$inputtype!=''">
                assertNotNull(stub.<xsl:value-of select="@name"/>(



Mime
View raw message