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 am...@apache.org on 2007/09/17 12:59:33 UTC

svn commit: r576363 - in /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java: TestClassTemplate.xsl TestObjectCreationTemplate.xsl

Author: amilas
Date: Mon Sep 17 03:59:28 2007
New Revision: 576363

URL: http://svn.apache.org/viewvc?rev=576363&view=rev
Log:
fixed an error with generated test case

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl?rev=576363&r1=576362&r2=576363&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestClassTemplate.xsl Mon Sep 17 03:59:28 2007
@@ -171,7 +171,8 @@
                                      <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of select="@name"/></xsl:if>
                                  </xsl:otherwise>
                              </xsl:choose>
-                        </xsl:for-each>,
+                        </xsl:for-each>
+                     <xsl:if test="count(input/param[@type!='']) > 0">,</xsl:if>
                     new <xsl:value-of select="$tempCallbackName"/>()
                 );
               </xsl:when>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl?rev=576363&r1=576362&r2=576363&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl Mon Sep 17 03:59:28 2007
@@ -25,7 +25,7 @@
     <!-- ############################   xmlbeans template   ##############################  -->
     <xsl:template match="databinders[@dbtype='xmlbeans']">
         //Create the desired XmlObject and provide it as the test object
-        public  org.apache.xmlbeans.XmlObject getTestObject(java.lang.Class type) throws Exception{
+        public  org.apache.xmlbeans.XmlObject getTestObject(java.lang.Class type) throws java.lang.Exception{
         java.lang.reflect.Method creatorMethod = null;
                 if (org.apache.xmlbeans.XmlObject.class.isAssignableFrom(type)){
                     Class[] declaredClasses = type.getDeclaredClasses();
@@ -41,7 +41,7 @@
                 if (creatorMethod!=null){
                     return  (org.apache.xmlbeans.XmlObject)creatorMethod.invoke(null,null);
                 }else{
-                    throw new Exception("Creator not found!");
+                    throw new java.lang.Exception("Creator not found!");
                 }
 
         }
@@ -87,14 +87,14 @@
     <!-- ############################   jaxme template   ##############################  -->
     <xsl:template match="databinders[@dbtype='jaxme']">
         //Create the desired Object and provide it as the test object
-        public  java.lang.Object getTestObject(java.lang.Class type) throws Exception{
+        public  java.lang.Object getTestObject(java.lang.Class type) throws java.lang.Exception{
             Class factoryClazz = org.apache.axis2.util.Loader.loadClass(type.getPackage().getName() + ".ObjectFactory"); 
             Object factory = factoryClazz.newInstance();   
             java.lang.reflect.Method creatorMethod = factoryClazz.getMethod("newInstance", new Class[]{ Class.class });
             if (creatorMethod != null) {
                 return creatorMethod.invoke(factory, null);
             } else {
-                throw new Exception("newInstance method not found!");
+                throw new java.lang.Exception("newInstance method not found!");
             }
         }
 
@@ -103,7 +103,7 @@
     <!-- ############################   ADB template   ###################################  -->
     <xsl:template match="databinders[@dbtype='adb']">
         //Create an ADBBean and provide it as the test object
-        public org.apache.axis2.databinding.ADBBean getTestObject(java.lang.Class type) throws Exception{
+        public org.apache.axis2.databinding.ADBBean getTestObject(java.lang.Class type) throws java.lang.Exception{
            return (org.apache.axis2.databinding.ADBBean) type.newInstance();
         }
 
@@ -164,7 +164,7 @@
     <!-- ############################   jaxme template   ##############################  -->
     <xsl:template match="databinders[@dbtype='jibx']">
         // create the desired object and provide it as the test object
-        public java.lang.Object getTestObject(java.lang.Class type) throws Exception {
+        public java.lang.Object getTestObject(java.lang.Class type) throws java.lang.Exception {
             return type.newInstance();
         }
 
@@ -173,7 +173,7 @@
     <!-- ############################   Jaxbri template   ###################################  -->
     <xsl:template match="databinders[@dbtype='jaxbri']">
         //Create an object and provide it as the test object
-        public Object getTestObject(java.lang.Class type) throws Exception{
+        public Object getTestObject(java.lang.Class type) throws java.lang.Exception{
            return type.newInstance();
         }
     </xsl:template>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org