axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r437383 - /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
Date Sun, 27 Aug 2006 15:17:12 GMT
Author: dims
Date: Sun Aug 27 08:17:11 2006
New Revision: 437383

URL: http://svn.apache.org/viewvc?rev=437383&view=rev
Log:
prevent duplicate toEnvelope's (see wsdl in AXIS2-1066)

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?rev=437383&r1=437382&r2=437383&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
Sun Aug 27 08:17:11 2006
@@ -1,5 +1,7 @@
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="text"/>
+    <xsl:key name="params" match="//databinders/param" use="@type"/>
+    
     <!-- #################################################################################
 -->
     <!-- ############################   ADB template   ##############################
 -->
     <xsl:template match="databinders[@dbtype='adb']">
@@ -34,6 +36,7 @@
             <xsl:if test="not($serverside)">
             <xsl:choose>
                 <xsl:when test="$paramcount &gt; 0">
+                    <xsl:variable name="inputElement" select="../../param[@type!='' and
@direction='in' and @opname=$opname]"></xsl:variable>
                     <xsl:variable name="inputElementType" select="../../param[@type!=''
and @direction='in' and @opname=$opname]/@type"></xsl:variable>
                     <xsl:variable name="wrappedParameterCount" select="count(../../param[@type!=''
and @direction='in' and @opname=$opname]/param)"></xsl:variable>
                      <xsl:choose>
@@ -70,7 +73,8 @@
 
                         </xsl:when>
 						<xsl:otherwise>
-						<!-- Assumption - the parameter is always an ADB element-->
+                            <xsl:if test="generate-id($inputElement) = generate-id(key('params',
$inputElementType)[1])">
+                        <!-- Assumption - the parameter is always an ADB element-->
 				    private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory
factory, <xsl:value-of select="$inputElementType"/> param, boolean optimizeContent){
                     org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
                          <xsl:choose>
@@ -85,7 +89,7 @@
                     </xsl:choose>
                      return emptyEnvelope;
                     }
-
+                             </xsl:if>
 						</xsl:otherwise>
 					 </xsl:choose>
                </xsl:when>



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


Mime
View raw message