axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <>
Subject RE: Array of Objects
Date Mon, 15 Apr 2002 21:55:33 GMT

FYI - for those that were following this thread.

I checked in a fix that should make things better for Object arrays.
We no longer spec arrays in quite the same way in the WSDL generation code.

We now generate this:

<schema targetNamespace="http://localhost:8080/ArrayEcho.jws"
 <complexType name="ArrayOf_xsd_anyType">
  <restriction base="SOAP-ENC:Array">
    <attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:anyType[]" /> 
 <element name="ArrayOf_xsd_anyType" nillable="true" type="intf:ArrayOf_xsd_anyType" />


Tom Jordahl

-----Original Message-----
From: Oliver Suciu []
Sent: Friday, April 12, 2002 3:40 PM
Subject: Re: Array of Objects

Same problem posted on axis-user a while ago -- my solution
(workaround?) was to modify the Axis WSDL (attached).

Why this WSDL works and not the one generated by java2wsdl,
I leave to the experts to analyze... The bottom line of the
typedef is the same (an array of anyType). It's either a bug
in .Net, or in the generated WSDL (or perhaps something in

-- Oliver

Tom Jordahl wrote:
> If I have a Java class that looks like this:
> public class ArrayEcho {
>     public Object[] echoArray (Object[] a)
>     {
>         return a;
>     }
> }
> The WSDL we generate looks like this:
>   <types>
>    <schema targetNamespace=""
>          xmlns="">
>      <element name="Array" nillable="true" type="SOAP-ENC:Array"/>
>    </schema>
>   </types>
>   <wsdl:message name="echoArrayRequest">
>     <wsdl:part name="a" type="SOAP-ENC:Array"/>
>   </wsdl:message>
>   <wsdl:message name="echoArrayResponse">
>     <wsdl:part name="return" type="SOAP-ENC:Array"/>
>   </wsdl:message>
> Is this valid WSDL?
> .NET wsdl.exe reports:
> -------------------------------------
> Schema validation warning: Type '' is
not declared.
> Warning: Schema could not be validated. Class generation may fail or may produce incorrect
> Error: Unable to import binding 'ArrayEchoSoapBinding' from namespace 'http://localhost:8080/ArrayEcho.jws'.
>   - Unable to import operation 'echoArray'.
>   - The datatype 'Array' is missing.
> --------------------------------------------
> But our tool correctly generates the stub:
>    public java.lang.Object[] echoArray(java.lang.Object[] a)
> Does anyone (Rich?) who understands the WSDL we generate for Arrays have any insight
on this?  Are generating (and parsing) incorrect WSDL or do we understand SOAP-ENC:Array and
.NET just doesn't?
> --
> Tom Jordahl
> Macromedia Server Development

View raw message