You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by am...@apache.org on 2010/12/28 06:39:46 UTC
svn commit: r1053264 - in
/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java:
InterfaceImplementationTemplate.xsl InterfaceTemplate.xsl
Author: amilas
Date: Tue Dec 28 05:39:46 2010
New Revision: 1053264
URL: http://svn.apache.org/viewvc?rev=1053264&view=rev
Log:
fixing the issue AXIS2-4866 put the fixe to not display , to in only operations and at the interface
Modified:
axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=1053264&r1=1053263&r2=1053264&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl (original)
+++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceImplementationTemplate.xsl Tue Dec 28 05:39:46 2010
@@ -904,6 +904,8 @@
*/
public void <xsl:text> </xsl:text><xsl:value-of select="@name"/>(
<xsl:variable name="inputcount" select="count(input/param[@location='body' and @type!=''])"/>
+ <xsl:variable name="inputParamCount" select="count(input/param[@location='body' and @type!='']/param)"/>
+
<xsl:choose>
<xsl:when test="$inputcount=1">
<!-- Even when the parameters are 1 we have to see whether we have the
@@ -922,7 +924,8 @@
<xsl:otherwise><!-- Just leave it - nothing we can do here --></xsl:otherwise>
</xsl:choose>
- <xsl:if test="$inputcount=1 and input/param[not(@location='body') and @type!='']">,</xsl:if>
+ <xsl:if test="($inputcount=1 and input/param[not(@location='body') and @type!='']) and
+ not($isUnwrapParameters and $inputParamCount=0)">,</xsl:if>
<xsl:for-each select="input/param[not(@location='body') and @type!='']">
<xsl:if test="position()>1">,</xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
</xsl:for-each>
Modified: axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl?rev=1053264&r1=1053263&r2=1053264&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl (original)
+++ axis/axis2/java/core/trunk/modules/codegen/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl Tue Dec 28 05:39:46 2010
@@ -113,6 +113,8 @@
<xsl:text> </xsl:text><xsl:value-of select="@name"/>(
<xsl:variable name="inputcount" select="count(input/param[@location='body' and @type!=''])"/>
+ <xsl:variable name="inputParamCount" select="count(input/param[@location='body' and @type!='']/param)"/>
+
<xsl:choose>
<xsl:when test="$inputcount=1">
<!-- Even when the parameters are 1 we have to see whether we have the
@@ -131,7 +133,8 @@
<xsl:otherwise><!-- Just leave it - nothing we can do here --></xsl:otherwise>
</xsl:choose>
- <xsl:if test="$inputcount=1 and input/param[not(@location='body') and @type!='']">,</xsl:if>
+ <xsl:if test="($inputcount=1 and input/param[not(@location='body') and @type!='']) and
+ not($isUnwrapParameters and $inputParamCount=0)">,</xsl:if>
<xsl:for-each select="input/param[not(@location='body') and @type!='']">
<xsl:if test="position()>1">,</xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
</xsl:for-each>)
@@ -202,11 +205,15 @@
*/
public void <xsl:text> </xsl:text><xsl:value-of select="@name"/>(
<xsl:variable name="inputcount" select="count(input/param[@location='body' and @type!=''])"/>
+ <xsl:variable name="isUnwrapParameters" select="input/param[@location='body' and @type!='']/@unwrappParameters"/>
+ <xsl:variable name="inputParamCount" select="count(input/param[@location='body' and @type!='']/param)"/>
+
<xsl:choose>
+
<xsl:when test="$inputcount=1">
<!-- Even when the parameters are 1 we have to see whether we have the
wrapped parameters -->
- <xsl:variable name="isUnwrapParameters" select="input/param[@location='body' and @type!='']/@unwrappParameters"/>
+
<xsl:choose>
<xsl:when test="$isUnwrapParameters">
<xsl:for-each select="input/param[@location='body' and @type!='']/param">
@@ -221,7 +228,8 @@
<xsl:otherwise><!-- Just leave it - nothing we can do here --></xsl:otherwise>
</xsl:choose>
- <xsl:if test="$inputcount=1 and input/param[not(@location='body') and @type!='']">,</xsl:if>
+ <xsl:if test="($inputcount=1 and input/param[not(@location='body') and @type!='']) and
+ not($isUnwrapParameters and $inputParamCount=0)">,</xsl:if>
<xsl:for-each select="input/param[not(@location='body') and @type!='']">
<xsl:if test="position()>1">,</xsl:if><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
</xsl:for-each>