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 di...@apache.org on 2006/08/29 20:29:28 UTC
svn commit: r438146 -
/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
Author: dims
Date: Tue Aug 29 11:29:27 2006
New Revision: 438146
URL: http://svn.apache.org/viewvc?rev=438146&view=rev
Log:
follow the same xsl:key hack on the server side to prevent duplicates of the toEnvelope method
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=438146&r1=438145&r2=438146&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 Tue Aug 29 11:29:27 2006
@@ -1,6 +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[@direction='in']" use="@type"/>
+ <xsl:key name="paramsIn" match="//databinders/param[@direction='in']" use="@type"/>
+ <xsl:key name="paramsOut" match="//databinders/param[@direction='out']" use="@type"/>
<!-- ################################################################################# -->
<!-- ############################ ADB template ############################## -->
@@ -73,7 +74,7 @@
</xsl:when>
<xsl:otherwise>
- <xsl:if test="generate-id($inputElement) = generate-id(key('params', $inputElementType)[1])">
+ <xsl:if test="generate-id($inputElement) = generate-id(key('paramsIn', $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();
@@ -102,7 +103,10 @@
<xsl:if test="$serverside">
<xsl:choose>
<xsl:when test="count(../../param[@type!='' and @direction='out' and @opname=$opname])=1">
+ <xsl:variable name="outElement" select="../../param[@type!='' and @direction='out' and @opname=$opname]"></xsl:variable>
+ <xsl:variable name="outElementType" select="../../param[@type!='' and @direction='out' and @opname=$opname]/@type"></xsl:variable>
<!-- Assumption - The ADBBean here is always an element based bean -->
+ <xsl:if test="generate-id($outElement) = generate-id(key('paramsOut', $outElementType)[1])">
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, <xsl:value-of select="../../param[@type!='' and @direction='out' and @opname=$opname]/@type"/> param, boolean optimizeContent){
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
<xsl:choose>
@@ -119,6 +123,7 @@
return emptyEnvelope;
}
+ </xsl:if>
</xsl:when>
</xsl:choose>
<xsl:if test="count(../../param[@type!='' and @direction='in' and @opname=$opname])=1">
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org