You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "matt@internode" <mb...@internode.com.au> on 2007/11/29 08:08:29 UTC

Axis 1.4 client, gSOAP server: Array Wrapping

Hi there, I have been trying to follow the discussions on array wrapping
using Axis 1.4 but am struggling to understand. I'd really appreciate some
help.

A portion of the gSOAP generated WSDL looks like:

<complexType name="UDRqueryItem">
   <sequence>
     <element name="elements" type="UDR:ArrayOfUDRqueryElement"
minOccurs="1" maxOccurs="1" nillable="false"/>
   </sequence>
  </complexType>
  <complexType name="ArrayOfUDRqueryItem">
   <complexContent>
    <restriction base="SOAP-ENC:Array">
     <sequence>
      <element name="item" type="UDR:UDRqueryItem" minOccurs="0"
maxOccurs="unbounded"/>
     </sequence>
     <attribute ref="SOAP-ENC:arrayType"
WSDL:arrayType="UDR:UDRqueryItem[]"/>
    </restriction>
   </complexContent>
  </complexType>
  <complexType name="UDRquery">
   <sequence>
     <element name="items" type="UDR:ArrayOfUDRqueryItem" minOccurs="1"
maxOccurs="1" nillable="false"/>
   </sequence>
  </complexType>

the sample XML output also generated by gSOAP during the compile looks like:

<items SOAP-ENC:arrayType="UDR:UDRqueryItem[1]">
 <item>
  <elements SOAP-ENC:arrayType="UDR:UDRqueryElement[1]"> 
   <item>
    <field>0</field> 
    <field-value /> 
     <op>0</op> 
    <value /> 
   </item>
  </elements>
 </item>
</items>

but the Axis 1.4 message comes out like:

<items>
 <elements>
  <field>4</field>
  <field-value>697018</field-value>
  <op>1</op>
 </elements>
</items>

i have tried to follow Anne's extremely helpful advice to people with
similar problems in other posts but have failed to grasp exactly what i
should do to fix this. could you please explain?? is it a matter of hand
editing the WSDL and then rerunning WSDL2Java? some have spoken of setting
something to WRAP or UNWRAP the arrays? i am happy to RTFM but can't see a
solution there or understand some of the info in extant posts. sorry!

and finally, i had a belt at Axis2 but came unstuck because the inproduction
SOAP server uses encoded bodies.

thanks very much!

  matt


-- 
View this message in context: http://www.nabble.com/Axis-1.4-client%2C-gSOAP-server%3A-Array-Wrapping-tf4895468.html#a14020480
Sent from the Axis - User mailing list archive at Nabble.com.


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