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 "Tim Kagle (JIRA)" <ax...@ws.apache.org> on 2005/04/13 21:35:17 UTC

[jira] Created: (AXIS-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

wrapped document/literal generates wrong SOAP message for arrays within arrays
------------------------------------------------------------------------------

         Key: AXIS-1926
         URL: http://issues.apache.org/jira/browse/AXIS-1926
     Project: Axis
        Type: Bug
 Environment: Linux, Axis 1.2RC3
    Reporter: Tim Kagle
    Priority: Blocker



First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:

http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082

I have a data type defined as:

<complexType name="NamedValue">
<sequence>
  <element name="name" nillable="true" type="xsd:string" />
  <element name="value" nillable="true" type="xsd:anyType" />
</sequence>
</complexType>

I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.

On the server side I have a method defined as:

NamedValue[] login(String username, String password, NamedValue[] options)

Which in the WSDL the request looks like this:

- <element name="login">
-   <complexType>
-     <sequence>
         <element name="username" type="xsd:string" />
         <element name="password" type="xsd:string" />
         <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
    </sequence>
  </complexType>
</element>

And the response like this:

- <element name="loginResponse">
- <complexType>
-   <sequence>
      <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
  </sequence>
</complexType>
</element>


If I create on the client side an options array that looks like this:

NamedValue[] options = new NamedValue[]
  {
    new NamedValue("dummy1", "dummy_val1"),

    new NamedValue("dummy2",
                   new NamedValue[]
                   {
                     new NamedValue("dummy2-1", "val2-1"),
                     new NamedValue("dummy2-2", new Integer(314))
                   })
  };

Note the array inside the array above.

A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
      </value>
      <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].


>From Anne Thomas Manes:

You're right. The array within the array should be mapped to this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

I suggest you file a bug report, because Axis is not generating the
right message structure per the WSDL.

Anne



-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Are u starting from WSDL (and use WSDL2Java to generate the server-side code?)

-- dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Data point: .NET generates the following:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
        <MyElement2 xmlns="http://types.echo.services">
            <username>xxx</username>
            <password>yyy</password>
            <options>
                <name>dummy1</name>
                <value xsi:type="xsd:string">dummy_val1</value>
            </options>
            <options>
                <name>dummy2</name>
                <value xsi:type="ArrayOfNamedValue">
                    <item>
                        <name>dummy2-1</name>
                        <value xsi:type="xsd:string">val2-1</value>
                    </item>
                    <item>
                        <name>dummy2-2</name>
                        <value xsi:type="xsd:int">314</value>
                    </item>
                </value>
            </options>
        </MyElement2>
    </soap:Body>
</soap:Envelope>

With the following code:
    public static void Main(string[] args) {
		ComplexEchoService service = new ComplexEchoService();
        MyComplexType2 request = new MyComplexType2();
        
        NamedValue[] options2 = new NamedValue[2];
        options2[0] = new NamedValue();
        options2[0].name = "dummy2-1";
        options2[0].value = "val2-1";
        options2[1] = new NamedValue();
        options2[1].name = "dummy2-2";
        options2[1].value = 314;

        NamedValue[] options = new NamedValue[2];
        options[0] = new NamedValue();
        options[0].name = "dummy1";
        options[0].value = "dummy_val1";
        options[1] = new NamedValue();
        options[1].name = "dummy2";
        options[1].value = options2;
        
        request.username = "xxx";
        request.password = "yyy";
        request.options = options;
		service.echo2(request);
    }


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Davanum Srinivas updated AXIS-1926:
-----------------------------------

    Priority: Blocker  (was: Major)

this opens up a can of worms...temporarily upgrading this to blocker.

-- dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62777 ]
     
Tim Kagle commented on AXIS-1926:
---------------------------------

Note that I would like to be able to pass as the "value" in the NamedValue bean all sorts of serializable types and arrays of these serializabale types which are not known until run-time what types they are. I'm not sure if this is possible, defining ArrayOfXxxx for every possible Xxxx (e.g. String, Long, NamedValue, OtherBeans, etc.) does not seem like a good solution.

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Why can't u use a NamedValueSet in between?

NamedValue[] options = new NamedValue[]{
          new NamedValue("dummy1", "dummy_val1"),
          new NamedValue("dummy2", 
                     new NamedValueSet (new NamedValue[]{
                            new NamedValue("dummy2-1", "val2-1"),
                            new NamedValue("dummy2-2", new Integer(314))
                         }))
     };


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=history ]

Tim Kagle updated AXIS-1926:
----------------------------

    Attachment: RemoteLoginManager.wsdl

Full WSDL (generated from Java classes by Axis 1.2RC3 nightly build as of April 11, 2005)

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Davanum Srinivas updated AXIS-1926:
-----------------------------------

    Priority: Major  (was: Blocker)

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

And we generate the following:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <MyElement2 xmlns="http://types.echo.services">
            <username>xxx</username>
            <password>yyy</password>
            <options>
                <name>dummy1</name>
                <value xsi:type="xsd:string">dummy_val1</value>
            </options>
            <options>
                <name>dummy2</name>
                <value xsi:type="ns1:ArrayOfNamedValue" xmlns:ns1="http://types.echo.services">
                    <value>
                        <name>dummy2-1</name>
                        <value xsi:type="xsd:string">val2-1</value>
                    </value>
                    <value>
                        <name>dummy2-2</name>
                        <value xsi:type="xsd:int">314</value>
                    </value>
                </value>
            </options>
        </MyElement2>
    </soapenv:Body>
</soapenv:Envelope>

When you run test.wsdl.echo.test2ComplexEchoServiceEcho21 unit test. So the difference is we are using the "value" instead of "item" as specified in the WSDL. Both .NET client and Axis client are handled by the server without problems.

-- dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Davanum Srinivas updated AXIS-1926:
-----------------------------------

    Attachment: diff.txt

diff

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim K (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62823 ]
     
Tim K commented on AXIS-1926:
-----------------------------

For us there is no workaround as we would have to change _a_lot_ of server side code which is not an option at this point in our development cycle.

I would appreciate it if you could consider this bug a blocker.

Thanks.

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim K (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_64295 ]
     
Tim K commented on AXIS-1926:
-----------------------------

Just for the record, using --wrapArrays is not a workaround for us as we have a *lot* of server side code that's already written which cannot be converted in a reasonable amount of time to work with the array wrappers.

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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] Assigned: (AXIS-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Davanum Srinivas reassigned AXIS-1926:
--------------------------------------

    Assign To: Glen Daniels

Glen,

Can you please help with this?

thanks,
dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62766 ]
     
Tim Kagle commented on AXIS-1926:
---------------------------------

A better link to the thread (thread view):

http://thread.gmane.org/gmane.comp.apache.webservices.axis.user/29082

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker

>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62803 ]
     
Tim Kagle commented on AXIS-1926:
---------------------------------

Yes, that would be the obvious choice, a wrapper around NamedValue. It's unfortunate but the server expects a NamedValue[], there's a lot of server side code that cannot be changed.

Also, the problem is not only with NamedValue[]. It needs to support String[], Long[], SomeOtherBean[], etc., etc. I would have to create wrappers for every possible array type that can be sent at run-time and also add these wrappers to the schema.

Is it possible to automate the process, e.g. create the wrappers automatically at run-time and then get rid of the wrappers on the server side and return the array directly?

I noticed Glen checked in a fix for a different bug that should allow for this (--unwrapArray option or something like that).

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim K (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_63122 ]
     
Tim K commented on AXIS-1926:
-----------------------------

I tried the build as of Monday April 18 and I get an NPE on the server when I use a NamedValue[] as the value of a NamedValue:

Caused by: java.lang.NullPointerException
        at org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:307)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)


The generated request message is wrong, it doesn't look like anything you described above, here's what I get for the "options" section:

            <options>
               <name>dummy1</name>
               <value xsi:type="xsd:string">dumy_val1</value>
            </options>
            <options>
               <name>dummy2</name>
               <value>
                  <value>
                     <name>dummy2-1</name>
                     <value xsi:type="xsd:string">val2-1</value>
                  </value>
                  <value>
                     <name>dummy2-2</name>
                     <value xsi:type="xsd:int">314</value>
                  </value>
               </value>
            </options>

Now, if I pass a String[] as the value, I don't get an NPE, but the request message is not correct at all:

            <options>
               <name>dummy1</name>
               <value xsi:type="xsd:string">dumy_val1</value>
            </options>
            <options>
               <name>dummy2</name>
               <value xsi:type="xsd:string">bla1</value>
               <value xsi:type="xsd:string">bla2</value>
               <value xsi:type="xsd:string">bla3</value>
            </options>

If I use a simple String as the value it works as expected.

So there are still problems with arrays inside arrays.

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Tim,

Can you please upload the complete wsdl (original) as attachment?

thanks,
dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker

>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Here's the soap env that i get:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <login xmlns="http://some.company.com/ws">
            <username>abc</username>
            <password>def</password>
            <options>
                <name>dummy1</name>
                <value xsi:type="xsd:string">dummy_val1</value>
            </options>
            <options>
                <name>dummy2</name>
                <value xsi:type="ns1:NamedValueSet" xmlns:ns1="http://some.company.com/ws">
                    <namedValues>
                        <item xmlns="">
                            <ns1:name>dummy2-1</ns1:name>
                            <ns1:value xsi:type="xsd:string">val2-1</ns1:value>
                        </item>
                        <item xmlns="">
                            <ns1:name>dummy2-2</ns1:name>
                            <ns1:value xsi:type="xsd:int">314</ns1:value>
                        </item>
                    </namedValues>
                </value>
            </options>
        </login>
    </soapenv:Body>
</soapenv:Envelope>


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim K (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62951 ]
     
Tim K commented on AXIS-1926:
-----------------------------

My latest questions:

Dims,

I'm not sure I understand your #3. If you recall I start from Java and
generate the WSDL, it's hard to change it by hand because I have 25 WSDL's
with about 20 methods each, they are complicated, what you are seeing
uploaded in the bug is just 1% of what I have ...

Where would I make this elementFormDefault="unqualified" change and is
this something that can be fixed in Java2WSDL?


Oh, another problem that I didn't mention:

It seems that I have to edit the WSDL by hand to add nillable="true" to
the response type, like this:

<element name="loginResponse">
  <complexType>
    <sequence name="loginResponseReturn" type="impl:ArrayOfNamedValue"
     nillable="true"/>
  </complexType>
</element>

Java2WSDL doesn't do this by default and .NET will no return a null object
even though the return value is xsi:nil

Can these 2 issues be fixed in Java2WSDL so that the WSDL generation just
works and I don't have to run a perl script on the generated WSDL files to
make all these changes? I would like to be able to automate the process
with an ant script where I start from java -> wsdl -> java without any
weird processing in between. Starting from the WSDL is just not an option
for us at this point as the server side java API still changes rapidly so
we have to generate the 25 WSDL files many times during the day, nobody
has time to keep fixing them by hand.

Thanks.

Tim


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62764 ]
     
Tim Kagle commented on AXIS-1926:
---------------------------------

Can we please make this a blocker for 1.2? I would like to try a patch right away when it's made available. Thank you.

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker

>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

*** PLEASE USE LATEST CVS ***

I was going through all the emails with Anne and came up with the "correct" soap message (i will upload a diff to the generated code as attachment to the bug report)

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <login xmlns="http://some.company.com/ws">
            <username>abc</username>
            <password>def</password>
            <options>
                <name>dummy1</name>
                <value xsi:type="xsd:string">dummy_val1</value>
            </options>
            <options>
                <name>dummy2</name>
                <value xsi:type="ns1:ArrayOfNamedValue" xmlns:ns1="http://some.company.com/ws">
                    <item xmlns="">
                        <ns1:name>dummy2-1</ns1:name>
                        <ns1:value xsi:type="xsd:string">val2-1</ns1:value>
                    </item>
                    <item xmlns="">
                        <ns1:name>dummy2-2</ns1:name>
                        <ns1:value xsi:type="xsd:int">314</ns1:value>
                    </item>
                </value>
            </options>
        </login>
    </soapenv:Body>
</soapenv:Envelope>

Basically there were 2 things:
#1: In the RemoteLoginManagerSoapBindingStub, ">loginResponse" and "ArrayOfNamedValue" were both mapped to NamedValue[].class. so the last one wins. Hence changed the order. and moved "ArrayOfNamedValue" to the end. This added the xsi:type="ns1:ArrayOfNamedValue" on the wire

#2: Since we don't generate any file for ArrayOfNamedValue, there is no place to specify that you should use "item"'s under "value". Hack here is to add a line in NamedValue.java itself.
elemField.setItemQName(new javax.xml.namespace.QName("", "item"));

With these changes, am able to get the effect that you wanted, which is to send NamedValue's like this and receive it on the server.

NamedValue[] options = new NamedValue[]{
              new NamedValue("dummy1", "dummy_val1"),
              new NamedValue("dummy2", new NamedValue[]{
                    new NamedValue("dummy2-1", "val2-1"),
                    new NamedValue("dummy2-2", new Integer(314))
              })
};

thanks,
-- dims


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Davanum Srinivas updated AXIS-1926:
-----------------------------------

    Description: 
First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:

http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082

I have a data type defined as:

<complexType name="NamedValue">
<sequence>
  <element name="name" nillable="true" type="xsd:string" />
  <element name="value" nillable="true" type="xsd:anyType" />
</sequence>
</complexType>

I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.

On the server side I have a method defined as:

NamedValue[] login(String username, String password, NamedValue[] options)

Which in the WSDL the request looks like this:

- <element name="login">
-   <complexType>
-     <sequence>
         <element name="username" type="xsd:string" />
         <element name="password" type="xsd:string" />
         <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
    </sequence>
  </complexType>
</element>

And the response like this:

- <element name="loginResponse">
- <complexType>
-   <sequence>
      <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
  </sequence>
</complexType>
</element>


If I create on the client side an options array that looks like this:

NamedValue[] options = new NamedValue[]
  {
    new NamedValue("dummy1", "dummy_val1"),

    new NamedValue("dummy2",
                   new NamedValue[]
                   {
                     new NamedValue("dummy2-1", "val2-1"),
                     new NamedValue("dummy2-2", new Integer(314))
                   })
  };

Note the array inside the array above.

A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
      </value>
      <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].


>From Anne Thomas Manes:

You're right. The array within the array should be mapped to this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

I suggest you file a bug report, because Axis is not generating the
right message structure per the WSDL.

Anne



  was:

First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:

http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082

I have a data type defined as:

<complexType name="NamedValue">
<sequence>
  <element name="name" nillable="true" type="xsd:string" />
  <element name="value" nillable="true" type="xsd:anyType" />
</sequence>
</complexType>

I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.

On the server side I have a method defined as:

NamedValue[] login(String username, String password, NamedValue[] options)

Which in the WSDL the request looks like this:

- <element name="login">
-   <complexType>
-     <sequence>
         <element name="username" type="xsd:string" />
         <element name="password" type="xsd:string" />
         <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
    </sequence>
  </complexType>
</element>

And the response like this:

- <element name="loginResponse">
- <complexType>
-   <sequence>
      <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
  </sequence>
</complexType>
</element>


If I create on the client side an options array that looks like this:

NamedValue[] options = new NamedValue[]
  {
    new NamedValue("dummy1", "dummy_val1"),

    new NamedValue("dummy2",
                   new NamedValue[]
                   {
                     new NamedValue("dummy2-1", "val2-1"),
                     new NamedValue("dummy2-2", new Integer(314))
                   })
  };

Note the array inside the array above.

A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
      </value>
      <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].


>From Anne Thomas Manes:

You're right. The array within the array should be mapped to this:

<login xmlns="http://some/namespace">
   <username>tim</username>
   <password>tim</password>
   <options>
      <name>dummy1</name>
      <value xsi:type="xsd:string">dummy_val1</value>
   </options>
   <options>
      <name>dummy2</name>
      <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
        <name>dummy2-1</name>
        <value xsi:type="xsd:string">val2-1</value>
        <name>dummy2-2</name>
        <value xsi:type="xsd:int">314</value>
      </value>
   </options>
</login>

I suggest you file a bug report, because Axis is not generating the
right message structure per the WSDL.

Anne



       Priority: Major  (was: Blocker)

downgrading the bug as there is a work around...

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim Kagle (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62780 ]
     
Tim Kagle commented on AXIS-1926:
---------------------------------

No, I'm starting with server side Java classes, carefully written to be exposed over WS:

Server Java Classes -> Java2WSDL -> WSDL2Java -> Client Java Classes

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim Kagle
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Tim,

that's why i have not marked the issue as resolved. i've just reduced the priority in order to get the release out.

thanks,
dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

Posted by "Tim K (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1926?page=comments#action_62950 ]
     
Tim K commented on AXIS-1926:
-----------------------------

Posting some emails I exchanged with Dims while JIRA was down.

Me:
---
1) Will String[] work as the value to a NamedValue because the XML schema
in the WSDL doesn't define an ArrayOfString type. What about .NET? Will it
work without ArrayOfString in the schema or do I have to have an
ArrayOfXxxx in the WSDL for all possible Xxxxx types at runtime?

2) Will your fix work with the automatic unwrapping of arrays that Glen
just checked in on Monday I believe making this String[] possible?

3) Another problem: .NET doesn't seem to like this:
<item xmlns="">
There's a patch for it that I applied to my old CVS myself, would you be
able to fix it? I don't think that xmlns="" is valid.

Here's the patch that I applied (I'm not sure where it comes from)

----
Modify org.apache.axis.encoding.SerializationContext.serializeActual()
method.

Existing:
                // -----------------
                // NOTE: I have seen doc/lit tests that use
                // the type name as the element name in multi-ref cases
                // (for example <soapenc:Array ... >)
                // In such cases the xsi:type is not passed along.
                // -----------------
                // The multiref QName is our own fake name.
                // It may be beneficial to set the name to the
                // type name, but I didn't see any improvements
                // in the interop tests.
                //if (name.equals(multirefQName) && type != null)
                //    name = type;
                ser.serialize(elemQName, attributes, value, this);
                return;

New:

                // -----------------
                // NOTE: I have seen doc/lit tests that use
                // the type name as the element name in multi-ref cases
                // (for example <soapenc:Array ... >)
                // In such cases the xsi:type is not passed along.
                // -----------------
                // The multiref QName is our own fake name.
                // It may be beneficial to set the name to the
                // type name, but I didn't see any improvements
                // in the interop tests.
                //if (name.equals(multirefQName) && type != null)
                //    name = type;

                if (elemQName.getNamespaceURI().equals("")){
                  elemQName = new
QName(this.nsStack.getNamespaceURI(""),elemQNa
me.getLocalPart());
                }

                ser.serialize(elemQName, attributes, value, this);
                return;
----


This is one tricky problem with xsd:anyType and arrays of random types
only known at run-time ...

Dims' reply:

For #1, You will have to try it out and see what happens
For #2, i was testing with latest CVS as of this moment :)
For #3, in your wsdl try using elementFormDefault="unqualified"
instead of changing the code.


> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays

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

Client side works w/o needing --wrapArrays...so am closing the bug. Right now there is no place to stick in the metadata about using "item" (as the element name of the items in the array) on the server-side, hence you need to generate the server-side code using --wrapArrays. Am lowering the priority of this bug since there is a work around for the server-side and client works as expected with latest changes.

thanks,
dims

> wrapped document/literal generates wrong SOAP message for arrays within arrays
> ------------------------------------------------------------------------------
>
>          Key: AXIS-1926
>          URL: http://issues.apache.org/jira/browse/AXIS-1926
>      Project: Axis
>         Type: Bug
>  Environment: Linux, Axis 1.2RC3
>     Reporter: Tim K
>     Assignee: Glen Daniels
>     Priority: Blocker
>  Attachments: RemoteLoginManager.wsdl, diff.txt
>
> First of all, this has been discussed on the users mailing list, please refer to this thread as it may have more up-to-date information:
> http://article.gmane.org/gmane.comp.apache.webservices.axis.user/29082
> I have a data type defined as:
> <complexType name="NamedValue">
> <sequence>
>   <element name="name" nillable="true" type="xsd:string" />
>   <element name="value" nillable="true" type="xsd:anyType" />
> </sequence>
> </complexType>
> I need the value to be xsd:anyType so that I can send arrays of NamedValue with various types for value.
> On the server side I have a method defined as:
> NamedValue[] login(String username, String password, NamedValue[] options)
> Which in the WSDL the request looks like this:
> - <element name="login">
> -   <complexType>
> -     <sequence>
>          <element name="username" type="xsd:string" />
>          <element name="password" type="xsd:string" />
>          <element name="options" type="impl:NamedValue" maxOccurs="unbounded" />
>     </sequence>
>   </complexType>
> </element>
> And the response like this:
> - <element name="loginResponse">
> - <complexType>
> -   <sequence>
>       <element name="loginReturn" type="impl:NamedValue" maxOccurs="unbounded" />
>   </sequence>
> </complexType>
> </element>
> If I create on the client side an options array that looks like this:
> NamedValue[] options = new NamedValue[]
>   {
>     new NamedValue("dummy1", "dummy_val1"),
>     new NamedValue("dummy2",
>                    new NamedValue[]
>                    {
>                      new NamedValue("dummy2-1", "val2-1"),
>                      new NamedValue("dummy2-2", new Integer(314))
>                    })
>   };
> Note the array inside the array above.
> A request to the server from an Axis client (latest CVS version of 1.2RC3) looks like this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>       </value>
>       <value xsi:type="ns2:NamedValue" xmlns:ns2="http://some/namespace">
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> The encoding of the array inside the array does not seem right to me, the server ends up with a NamedValue value for "dummy2" instead of a NamedValue[].
> From Anne Thomas Manes:
> You're right. The array within the array should be mapped to this:
> <login xmlns="http://some/namespace">
>    <username>tim</username>
>    <password>tim</password>
>    <options>
>       <name>dummy1</name>
>       <value xsi:type="xsd:string">dummy_val1</value>
>    </options>
>    <options>
>       <name>dummy2</name>
>       <value xsi:type="ns1:NamedValue" xmlns:ns1="http://some/namespace">
>         <name>dummy2-1</name>
>         <value xsi:type="xsd:string">val2-1</value>
>         <name>dummy2-2</name>
>         <value xsi:type="xsd:int">314</value>
>       </value>
>    </options>
> </login>
> I suggest you file a bug report, because Axis is not generating the
> right message structure per the WSDL.
> Anne

-- 
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