You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by am...@apache.org on 2006/11/25 06:04:55 UTC

svn commit: r479081 - in /webservices/axis2/branches/java/1_1/modules: codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl

Author: amilas
Date: Fri Nov 24 21:04:55 2006
New Revision: 479081

URL: http://svn.apache.org/viewvc?view=rev&rev=479081
Log:
Added jaxbri support to test template and fixed a mistake in JaxbRIDatabindingTemplate.xsl
 

Modified:
    webservices/axis2/branches/java/1_1/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl
    webservices/axis2/branches/java/1_1/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl

Modified: webservices/axis2/branches/java/1_1/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl?view=diff&rev=479081&r1=479080&r2=479081
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl (original)
+++ webservices/axis2/branches/java/1_1/modules/codegen/src/org/apache/axis2/wsdl/template/java/TestObjectCreationTemplate.xsl Fri Nov 24 21:04:55 2006
@@ -127,6 +127,14 @@
 
     </xsl:template>
     <!-- #################################################################################  -->
+    <!-- ############################   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{
+           return type.newInstance();
+        }
+    </xsl:template>
+    <!-- #################################################################################  -->
     <!-- ############################   jaxme template   ##############################  -->
     <xsl:template match="databinders[@dbtype='jibx']">
         // create the desired object and provide it as the test object

Modified: webservices/axis2/branches/java/1_1/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl?view=diff&rev=479081&r1=479080&r2=479081
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl (original)
+++ webservices/axis2/branches/java/1_1/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl Fri Nov 24 21:04:55 2006
@@ -13,8 +13,6 @@
             };
         </xsl:if>
 
-        <xsl:variable name="firstType"><xsl:value-of select="param[1]/@type"/></xsl:variable>
-
         <xsl:for-each select="param[not(@type = preceding-sibling::param/@type)]">
             <xsl:if test="@type!=''">
                 private static final javax.xml.bind.JAXBContext <xsl:value-of select="translate(@type,'.','_')"/>;
@@ -55,11 +53,11 @@
                         JaxbRIDataSource source = new JaxbRIDataSource( <xsl:value-of select="@type"/>.class,
                                                                         param,
                                                                         marshaller,
-                                                                        "<xsl:value-of select='current()/qname/@nsuri'/>",
-                                                                        "<xsl:value-of select='current()/qname/@localname'/>");
-                        org.apache.axiom.om.OMNamespace namespace = factory.createOMNamespace("<xsl:value-of select='current()/qname/@nsuri'/>",
+                                                                        "<xsl:value-of select="qname/@nsuri"/>",
+                                                                        "<xsl:value-of select="qname/@localname"/>");
+                        org.apache.axiom.om.OMNamespace namespace = factory.createOMNamespace("<xsl:value-of select="qname/@nsuri"/>",
                                                                            null);
-                        return factory.createOMElement(source, "<xsl:value-of select='current()/qname/text()'/>", namespace);
+                        return factory.createOMElement(source, "<xsl:value-of select="qname/@localname"/>", namespace);
                     } catch (javax.xml.bind.JAXBException bex){
                         throw new RuntimeException(bex);
                     }



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