axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Russell Butek" <>
Subject Re: WSDL2Java optional arrays
Date Tue, 05 Feb 2002 19:53:40 GMT
I guess I need more info.  I tried a couple variations of the use of
optionalStringArrayTest and they compiled.  Could I see the full WSDL?
What version are you running?

Russell Butek

Thomas Sandholm <> on 02/05/2002 01:11:58 PM

Please respond to

Subject:  WSDL2Java optional arrays


I have some problems with optional arrays and WSDL2Java.

This is in my WSDL def:

   <complexType name="ArrayOfString">
       <restriction base="soap-enc:Array">
         <attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/>

  <element name="optionalStringArrayTest" type="base-types:ArrayOfString"
minOccurs="0" maxOccurs="1"/>

Now the stub code will give me the following error: ']' expected
             java.lang.String[][] a = new java.lang.String[][i+1];

Below is a bigger snippet from the failing stub code:

public void setOptionalStringArrayTest(int i, java.lang.String[] value) {
         if (optionalStringArrayTest == null ||
             optionalStringArrayTest.length <= i) {
             java.lang.String[][] a = new java.lang.String[][i+1];
             if (optionalStringArrayTest != null) {
                 for(int j=0; j<optionalStringArrayTest.length; j++)
                     a[j] = optionalStringArrayTest[j];
             optionalStringArrayTest = a;
         optionalStringArrayTest[i] = value;

I'd appreciate if anyone could shed some light on this.


Thomas Sandholm <>
The Globus Project(tm) <>
Distributed Systems Laboratory
Mathematics and Computer Science Division
Argonne National Laboratory

View raw message