Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.4
-
None
-
None
Description
I have a class which generates output based on the descriptor objects of a deployed web application. One of my operations take an object as a parameter. That object has a field of class String[]. The operation itself all works perfectly. However when I ElementDesc for that field getFields of the TypeDesc, the getXmlType() method always returns a QName that resolves to String.class.
From the API, it looks like the getArrayType() should be returning a QName which resolves to String[].class. In my case ArrayOf_xsd_string.
Looking at the code, the getArrayType method currently always returns null.
I was able to fix this by modifying the following class:
org.apache.axis.wsdl.toJava.JavaBeanHelperWriter:
Index: D:/Apache/axis-1.x-svn/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java
===================================================================
— D:/Apache/axis-1.x-svn/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java (revision 415249)
+++ D:/Apache/axis-1.x-svn/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java (working copy)
@@ -328,13 +328,13 @@
// Some special handling for arrays.
TypeEntry elemType = elem.getType();
QName xmlType = null;
-
+ QName arrayType = null;
if ((elemType.getDimensions().length() > 1)
&& (elemType.getClass() == DefinedType.class))
else if (elemType.getClass() == DefinedElement.class
&& elemType.getRefType() != null)
+ if (arrayType != null)
{ + pw.println(" elemField.setArrayType(" + + Utils.getNewQName(arrayType) + ");"); + } if (elem.getMinOccursIs0()) {
pw.println(" elemField.setMinOccurs(0);");
@@ -388,6 +392,7 @@
if(elem.getMaxOccursIsUnbounded())
+
QName itemQName = elem.getType().getItemQName();
if (itemQName != null) {
pw.println(" elemField.setItemQName(" +
Thanks,
Leif