jmsnell 2003/02/27 12:14:18
Modified: java/src/org/apache/axis/wsdl/toJava
JavaBeanHelperWriter.java
Log:
FIX: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17017
Ok, modified the code so that it serializes the right metadata. The problem
was in the code that specially handles refTypes. If an ArrayType is an
array, the code was outputting metadata for the array elements rather
than the array itself. I added a check to catch this situation.
Revision Changes Path
1.33 +4 -3
xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java
Index: JavaBeanHelperWriter.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- JavaBeanHelperWriter.java 24 Feb 2003 03:38:41 -0000 1.32
+++ JavaBeanHelperWriter.java 27 Feb 2003 20:14:18 -0000 1.33
@@ -273,17 +273,18 @@
// Some special handling for arrays
TypeEntry elemType = elem.getType();
- while (elemType.getRefType() != null) {
+ while (elemType.getRefType() != null &&
+ !(elem.getType().getDimensions().indexOf("[") > -1)) {
elemType = elemType.getRefType();
}
QName xmlType = elemType.getQName();
- if (xmlType != null && xmlType.getLocalPart().indexOf("[") > 0)
{
+ if ((xmlType != null && xmlType.getLocalPart().indexOf("[") >
0)) {
// Skip array types, because they are special
xmlType = null;
}
-
+
pw.print(" ");
if (!wroteElemDecl) {
pw.print("org.apache.axis.description.ElementDesc ");