axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r433126 - /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Date Mon, 21 Aug 2006 02:58:53 GMT
Author: dims
Date: Sun Aug 20 19:58:53 2006
New Revision: 433126

URL: http://svn.apache.org/viewvc?rev=433126&view=rev
Log:
change the multiple xsl:if's to a xsl:choose/xsl:when so that i can add an otherwise statement
to over the default condition. This fixes the bug where body of UUIDType#setString method
was empty in eBay wsdl

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

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?rev=433126&r1=433125&r2=433126&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
Sun Aug 20 19:58:53 2006
@@ -382,44 +382,45 @@
                    		
                    		<xsl:choose>
                         <xsl:when test="(@restrictionBaseType)">
-                   		
-                   		<xsl:if test="(@patternFacet)">
-                    		if ( param.matches( "<xsl:value-of select="$patternFacet"/>"
)) {  
-                   				this.<xsl:value-of select="$varName"/>=param;
-                   			}
-                   			else {
-                   				throw new java.lang.RuntimeException();
-                   			}
-                   		</xsl:if>
-						
-						<xsl:if test="(@lenFacet)">
-                    		if ( param.length() == <xsl:value-of select="@lenFacet"/> ) {
 
-                   				this.<xsl:value-of select="$varName"/>=param;
-                   			}
-                   			else {
-                   				throw new java.lang.RuntimeException();
-                   			}
-                   		</xsl:if>
-                   		
-                   		<xsl:if test="(@maxLenFacet) or (@minLenFacet)">
-                    		if ( <xsl:if test="(@minLenFacet)"> <xsl:value-of select="$minLenFacet"/>
&lt; </xsl:if> param.length() <xsl:if test="(@maxLenFacet)"> &gt; <xsl:value-of
select="$maxLenFacet"/> = </xsl:if> ) {  
-                   				this.<xsl:value-of select="$varName"/>=param;
-                   			}
-                   			else {
-                   				throw new java.lang.RuntimeException();
-                   			}
-                   		</xsl:if>
-                   		
-                   		<xsl:if test="(@maxExFacet) or (@minExFacet) or (@maxInFacet) or
(@minInFacet)">
-                    		if ( <xsl:if test="(@minExFacet)"> <xsl:value-of select="$minExFacet"/>
&lt; </xsl:if> <xsl:if test="(@minInFacet)"> <xsl:value-of select="$minInFacet"/>
&lt;= </xsl:if> param <xsl:if test="(@maxExFacet)"> &gt; <xsl:value-of
select="$maxExFacet"/> </xsl:if> <xsl:if test="(@maxInFacet)"> &gt;= <xsl:value-of
select="$maxInFacet"/> </xsl:if> ) {
-                    	 
-                   				this.<xsl:value-of select="$varName"/>=param;
-                   			}
-                   			else {
-                   				throw new java.lang.RuntimeException();
-                   			}
-                   		</xsl:if>
-						</xsl:when>
+                           <xsl:choose>
+                            <xsl:when test="(@patternFacet)">
+                                if ( param.matches( "<xsl:value-of select="$patternFacet"/>"
)) {  
+                                    this.<xsl:value-of select="$varName"/>=param;
+                                }
+                                else {
+                                    throw new java.lang.RuntimeException();
+                                }
+                            </xsl:when>
+                            <xsl:when test="(@lenFacet)">
+                                if ( param.length() == <xsl:value-of select="@lenFacet"/>
) {  
+                                    this.<xsl:value-of select="$varName"/>=param;
+                                }
+                                else {
+                                    throw new java.lang.RuntimeException();
+                                }
+                            </xsl:when>
+                            <xsl:when test="(@maxLenFacet) or (@minLenFacet)">
+                                if ( <xsl:if test="(@minLenFacet)"> <xsl:value-of
select="$minLenFacet"/> &lt; </xsl:if> param.length() <xsl:if test="(@maxLenFacet)">
&gt; <xsl:value-of select="$maxLenFacet"/> = </xsl:if> ) {  
+                                    this.<xsl:value-of select="$varName"/>=param;
+                                }
+                                else {
+                                    throw new java.lang.RuntimeException();
+                                }
+                            </xsl:when>
+                            <xsl:when test="(@maxExFacet) or (@minExFacet) or (@maxInFacet)
or (@minInFacet)">
+                                if ( <xsl:if test="(@minExFacet)"> <xsl:value-of
select="$minExFacet"/> &lt; </xsl:if> <xsl:if test="(@minInFacet)"> <xsl:value-of
select="$minInFacet"/> &lt;= </xsl:if> param <xsl:if test="(@maxExFacet)">
&gt; <xsl:value-of select="$maxExFacet"/> </xsl:if> <xsl:if test="(@maxInFacet)">
&gt;= <xsl:value-of select="$maxInFacet"/> </xsl:if> ) {
+                             
+                                    this.<xsl:value-of select="$varName"/>=param;
+                                }
+                                else {
+                                    throw new java.lang.RuntimeException();
+                                }
+                            </xsl:when>
+                            <xsl:otherwise>
+                                 this.<xsl:value-of select="$varName"/>=param;
+                            </xsl:otherwise>
+                        </xsl:choose>
+                        </xsl:when>
 						
 						<xsl:otherwise>
 								this.<xsl:value-of select="$varName"/>=param;



---------------------------------------------------------------------
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