Thanks Tom.
Rich Scheuerle
XML & Web Services Development
512-838-5115 (IBM TL 678-5115)
[EMAIL PROTECTED]
To: [EMAIL PROTECTED]
04/15/2002 02:50 cc:
PM Subject: cvs commit:
xml-axis/java/src/org/apache/axis/wsdl/fromJava Types.java
Please respond to
axis-dev
tomj 02/04/15 12:50:08
Modified: java/src/org/apache/axis/wsdl/fromJava Types.java
Log:
Emit better WSDL for arrays.
Instead of defining ArrayOfArrayOf_xsd_int, which has ArrayOf_xsd_int[]
as its
type, which is then defined to be an array of ints, we now define a
single type
which has mulitple dimesions.
This improved what we emit for various array types, and fixes a problem
with
Object arrays, which prevented our WSDL from being processed by .NET.
Revision Changes Path
1.20 +9 -2
xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
Index: Types.java
===================================================================
RCS file:
/home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Types.java 1 Apr 2002 20:12:17 -0000 1.19
+++ Types.java 15 Apr 2002 19:50:08 -0000 1.20
@@ -378,8 +378,15 @@
String componentTypeName = null;
Class componentType = null;
if (type.isArray()) {
+ String dimString = "[]";
componentType = type.getComponentType();
- componentTypeName = writeType(componentType);
+ if (componentType.isArray()) {
+ while (componentType.isArray()) {
+ dimString += "[]";
+ componentType = componentType.getComponentType();
+ }
+ }
+ componentTypeName = writeType(componentType) + dimString;
}
String soapTypeName = qName.getLocalPart();
@@ -409,7 +416,7 @@
attribute.setAttribute("ref",
Constants.NSPREFIX_SOAP_ENC
+":arrayType");
attribute.setAttribute(Constants.NSPREFIX_WSDL
+":arrayType",
- componentTypeName + "[]" );
+ componentTypeName );
} else {
if (isEnumClass(type)) {
writeEnumType(qName, type);