axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Jordahl (JIRA)" <>
Subject [jira] Commented: (AXIS-1615) java2wsdl generates wrong return format
Date Sun, 21 Nov 2004 15:55:26 GMT
     [ ]
Tom Jordahl commented on AXIS-1615:

Axis is broken for wrapped/doc/lit arrays.

The WSDL we put out for this service:
  String[] echoStringArray(String [] argArray) {
    return argArray; 

Is this:
   <element name="echoArray">
      <element maxOccurs="unbounded" name="argArray" type="xsd:string"/>

And sure enough, we send XML that matches this:

Which Axis can't deserialize because there is no wrapping element for it to hang the array
deserializer off of.

I can fix it to match .NET, which I think is much better by changing code in, line
601 to comment out the array condition:

        //if (javaType.isArray() && !javaType.equals(byte[].class)) {
        //    type = writeTypeForPart(javaType.getComponentType(), null);
        //} else {
            type = writeTypeForPart(javaType, type);

Then we get WSDL like this:

<element name="echoArray">
   <element maxOccurs="unbounded" name="argArray" type="impl:ArrayOf_xsd_string"/>
<complexType name="ArrayOf_xsd_string">
  <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:string"/>

But WSDL2Java is completely screwing the pooch on this as it creates a type called
and the stub returns an array of these. (!!)

So I believe I need to go at it from the WSDL2Java point of view now, going with the 'fixed'
wrapped WSDL.  This also fixes the document style WSDL as well, as now it is generating this:
   <element name="argArray" type="xsd:string"/>

I know we weren't this broken generating stubs with .NET arrays in 1.1, so things have really
regressed in this area.

I am working on this now.

> java2wsdl generates wrong return format
> ---------------------------------------
>          Key: AXIS-1615
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2 Beta, 1.2RC1
>  Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04
>     Reporter: Paul Bouche
>  Attachments:, doc.wsdl, wrapped.wsdl
> When returning an array of int or arrays of String, ie. int[] or String[] and creating
a wsdl for this service using
> java2wsdl -y DOCUMENT -u LITERAL -lhttp://foo testsimplearrays.TestSimpleArraysService
-o doc.wsdl a wrong return type is generated. Instead of int[] it is int, the same with String[].
> Please see attached files for reproduction.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message