You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/21 18:07:13 UTC

[jira] Created: (AXIS-1615) java2wsdl generates wrong return format

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1615

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1615
    Summary: java2wsdl generates wrong return format
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta
             1.2RC1

   Assignee: 
   Reporter: Paul Bouche

    Created: Thu, 21 Oct 2004 9:07 AM
    Updated: Thu, 21 Oct 2004 9:07 AM
Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04

Description:
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.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1615?page=comments#action_63353 ]
     
Davanum Srinivas commented on AXIS-1615:
----------------------------------------

Tom,

Has this been fixed in latest CVS?

thanks,
dims

> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://issues.apache.org/jira/browse/AXIS-1615
>      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
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1615) java2wsdl generates wrong return format

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: Paul Bouche (mailto:paul.bouche@hpi.uni-potsdam.de)
       Date: Thu, 21 Oct 2004 9:08 AM
    Changes:
             Attachment changed to TestSimpleArraysService.java
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1615?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1615

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1615
    Summary: java2wsdl generates wrong return format
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta
             1.2RC1

   Assignee: 
   Reporter: Paul Bouche

    Created: Thu, 21 Oct 2004 9:07 AM
    Updated: Thu, 21 Oct 2004 9:08 AM
Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04

Description:
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.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1615) java2wsdl generates wrong return format

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: Paul Bouche (mailto:paul.bouche@hpi.uni-potsdam.de)
       Date: Thu, 21 Oct 2004 9:10 AM
    Comment:
When generating a wrapped service style wsdl for the same service using
java2wsdl -y WRAPPED -u LITERAL -lhttp://foo testsimplearrays.TestSimpleArraysService -o wrapped.wsdl
one gets this wsdl generated which contains the correct return types.
    Changes:
             Attachment changed to wrapped.wsdl
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1615?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1615

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1615
    Summary: java2wsdl generates wrong return format
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta
             1.2RC1

   Assignee: 
   Reporter: Paul Bouche

    Created: Thu, 21 Oct 2004 9:07 AM
    Updated: Thu, 21 Oct 2004 9:10 AM
Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04

Description:
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.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1615?page=comments#action_63680 ]
     
Tom Jordahl commented on AXIS-1615:
-----------------------------------

The behavior is still the same, but the array code has changed significantly since I did the original investigation.  I am still not convinced we do the right thing here, but I have not been able to investigate with the current 1.2 code base.


> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://issues.apache.org/jira/browse/AXIS-1615
>      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
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1615) java2wsdl generates wrong return format

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: Paul Bouche (mailto:paul.bouche@hpi.uni-potsdam.de)
       Date: Thu, 21 Oct 2004 9:09 AM
    Changes:
             Attachment changed to doc.wsdl
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1615?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1615

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1615
    Summary: java2wsdl generates wrong return format
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2 Beta
             1.2RC1

   Assignee: 
   Reporter: Paul Bouche

    Created: Thu, 21 Oct 2004 9:07 AM
    Updated: Thu, 21 Oct 2004 9:09 AM
Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04

Description:
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.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1615?page=history ]

Tom Jordahl updated AXIS-1615:
------------------------------

    Assign To: Tom Jordahl
      Summary: Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen  (was: java2wsdl generates wrong return format)

Updated summary.

> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1615
>      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
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1615?page=all ]
     
Davanum Srinivas resolved AXIS-1615:
------------------------------------

    Resolution: Fixed

tried latest CVS just now. fixed.

> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://issues.apache.org/jira/browse/AXIS-1615
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC1, 1.2 Beta
>  Environment: Windows XP all current updates, Tomcat 5.0, Java v1.4.2_05-b04
>     Reporter: Paul Bouche
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Ashutosh Shahi (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1615?page=comments#action_55726 ]
     
Ashutosh Shahi commented on AXIS-1615:
--------------------------------------

Tom, 
    The snippet of java code and output wsdl that u showed occurs for wrapped/literal. For doc/lit, axis doesn't even give the return type as array, u can check the doc.wsdl provided by Paul. 
     I think we need to modify the witeElementDecl method in Types.java, such that if javaType.isArray is true, we set maxOccurs="unbounded" for all serializable types.
     Tell me if there is any misunderstanding on my part.
Ashu...

> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1615
>      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
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1615) Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen

Posted by "Erik Tews (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1615?page=comments#action_57357 ]
     
Erik Tews commented on AXIS-1615:
---------------------------------

Hi

Any updates on this problem? I got this problem here too and would be very intrested in a solution.

> Axis 1.2 literal array's are broken: WSDL2Java and WSDL gen
> -----------------------------------------------------------
>
>          Key: AXIS-1615
>          URL: http://issues.apache.org/jira/browse/AXIS-1615
>      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
>     Assignee: Tom Jordahl
>  Attachments: TestSimpleArraysService.java, 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1615) java2wsdl generates wrong return format

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1615?page=comments#action_55715 ]
     
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">
    <complexType>
     <sequence>
      <element maxOccurs="unbounded" name="argArray" type="xsd:string"/>
     </sequence>
    </complexType>
   </element>

And sure enough, we send XML that matches this:
<echoArray>
  <argArray>one</argArray>
  <argArray>one</argArray>
  <argArray>one</argArray>
</echoArray>

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 Types.java, 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">
 <complexType>
  <sequence>
   <element maxOccurs="unbounded" name="argArray" type="impl:ArrayOf_xsd_string"/>
  </sequence>
 </complexType>
</element>
<complexType name="ArrayOf_xsd_string">
 <sequence>
  <element maxOccurs="unbounded" minOccurs="0" name="item" type="xsd:string"/>
 </sequence>
</complexType>

But WSDL2Java is completely screwing the pooch on this as it creates a type called ArrayOfString.java 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: http://nagoya.apache.org/jira/browse/AXIS-1615
>      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: TestSimpleArraysService.java, 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:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira