axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: [Axis 1.4] Arrays Interop with .NET etc
Date Thu, 28 Sep 2006 12:00:05 GMT
Please file a JIRA.

On 9/28/06, Ian Su <iansu@optusnet.com.au> wrote:
> Hi,
>
> I'm having trouble getting arrays of objects to be sent properly from an Axis 1.4 servlet
to a .NET client.
>
> In my <wsdl:types> I have:
>
>   <xsd:complexType name="Thing">
>     <xsd:sequence>
>       <xsd:element name="value" type="xsd:int"/>
>     </xsd:sequence>
>   </xsd:complexType>
>
>   <xsd:complexType name="ArrayOfThing">
>     <xsd:sequence>
>       <xsd:element maxOccurs="unbounded" name="item" type="typens:Thing"/>
>     </xsd:sequence>
>   </xsd:complexType>
>
>   <xsd:element name="GetThingArrayResponse">
>     <xsd:complexType>
>       <xsd:sequence>
>         <xsd:element name="wrapper" type="typens:ArrayOfThing"/>
>       </xsd:sequence>
>     </xsd:complexType>
>   </xsd:element>
>
> I then use WSDL2Java to generate the servlet, and then I tried using it against a .NET
as well as a gSOAP client. Both doesn't work (always get nothing in the array). The gSOAP
client gives out this warning:
>
>   Tags 'ns1:value' and 'SOAP-ENV:' match but namespaces differ
>   Tags 'ns2:value' and 'SOAP-ENV:' match but namespaces differ
>   Tags 'ns3:value' and 'SOAP-ENV:' match but namespaces differ
>
> The SOAP body that gets sent by the servlet is very weird, with a new namespace definition
every array element like this:
>
>   <soapenv:Body>
>     <GetThingArrayResponse xmlns="http://test.ians">
>       <wrapper xmlns:ns1="http://test.ians" xsi:type="ns1:Thing">
>         <ns1:value>0</ns1:value>
>       </wrapper>
>       <wrapper xmlns:ns2="http://test.ians" xsi:type="ns2:Thing">
>         <ns2:value>1</ns2:value>
>       </wrapper>
>       <wrapper xmlns:ns3="http://test.ians" xsi:type="ns3:Thing">
>         <ns3:value>2</ns3:value>
>       </wrapper>
>     </GetThingArrayResponse>
>   </soapenv:Body>
>
> However if I don't use the ArrayOfThing type, and put the array definition in the Response
element, it works for both .NET and gSOAP clients:
>
>   <xsd:element name="GetThingArrayResponse">
>     <xsd:complexType>
>       <xsd:sequence>
>         <xsd:element maxOccurs="unbounded" name="item" type="typens:Thing"/>
>       </xsd:sequence>
>     </xsd:complexType>
>   </xsd:element>
>
> The SOAP body sent by Axis looks normal, like this:
>
>   <soapenv:Body>
>     <GetThingArrayResponse xmlns="http://test.ians">
>       <item>
>         <value>0</value>
>       </item>
>       <item>
>         <value>1</value>
>       </item>
>       <item>
>         <value>2</value>
>       </item>
>       <item>
>         <value>3</value>
>       </item>
>     </GetThingArrayResponse>
>   </soapenv:Body>
>
> However I need to be able to define array types besides just in the Resopnse element.
I have also tried to follow the example here
>
>   http://dinoch.dyndns.org:7070/axis1.2/AboutCtService.jsp
>
> But it doesn't seem to work either.
>
> Any advice would be greatly appreciated!!
>
> Ian.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message