butek 2002/06/13 15:36:23
Modified: java/src/org/apache/axis/wsdl/toJava JavaEnumTypeWriter.java
java/test/wsdl/types ComprehensiveTypes.wsdl
Log:
TCK found a bug. Literal integral strings from XML can make their way to
Java enum classes. If these strings are long values, then they must end
in "L".
Revision Changes Path
1.9 +5 -0
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java
Index: JavaEnumTypeWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaEnumTypeWriter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JavaEnumTypeWriter.java 7 Jun 2002 12:45:08 -0000 1.8
+++ JavaEnumTypeWriter.java 13 Jun 2002 22:36:23 -0000 1.9
@@ -136,6 +136,11 @@
!value.endsWith("f")) // doesn't complain about precision.
value += "F";
}
+ else if (baseClass.equals("Long")) {
+ if (!value.endsWith("L") && // Indicate float literal so javac
+ !value.endsWith("l")) // doesn't complain about precision.
+ value += "L";
+ }
values.add(value);
}
1.30 +2 -0 xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl
Index: ComprehensiveTypes.wsdl
===================================================================
RCS file: /home/cvs/xml-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ComprehensiveTypes.wsdl 31 May 2002 15:17:11 -0000 1.29
+++ ComprehensiveTypes.wsdl 13 Jun 2002 22:36:23 -0000 1.30
@@ -228,6 +228,8 @@
<xsd:enumeration value="1"/>
<xsd:enumeration value="2"/>
<xsd:enumeration value="3"/>
+ <xsd:enumeration value="-9223372036854775808"/>
+ <xsd:enumeration value="9223372036854775807"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="enumShort">