axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim K (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1926) wrapped document/literal generates wrong SOAP message for arrays within arrays
Date Sat, 16 Apr 2005 03:28:58 GMT
     [ 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


Mime
View raw message