According to the WS-I Basic Profile [1] (see Section 4.3.3) Given the XML Schema Description:
<xsd:element name="MyArray1" type="tns:MyArray1Type"/> <xsd:complexType name="MyArray1Type"> <xsd:sequence> <xsd:element name="x" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> The envelope would serialize as (omitting namespace declarations for clarity): <MyArray1> <x>abcd</x> <x>efgh</x> </MyArray1> Note that this is the proper way to define an array using document literal. This type of definition should generate a wrapper (<MyArray1>) for the array elements (<x>). If you have defined your array this way, but it does not generate the <MyArray1> wrapper element, then there's obviously a bug. Nested arrays work pretty much the same way -- there should always be a wrapper element for the array elements. Given the XML Schema Description: <xsd:element name="MyArray1" type="tns:MyArray1Type"/> <xsd:complexType name="MyArray1Type"> <xsd:sequence> <xsd:element name="MyArray2" type="tns:MyArray2Type" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="MyArray2Type"> <xsd:sequence> <xsd:element name="x" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> The envelope would serialize as (omitting namespace declarations for clarity): <MyArray1> <MyArray2> <x>abcd</x> <x>efgh</x> </MyArray2> <MyArray2> <x>ijkl</x> <x>mnop</x> </MyArray2> </MyArray1> I suspect that the interop problems may be caused by the way the Schema definitions are generated. Can you provide us with the generated XML Schema definitions of the nested arrays? [1] http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#soapenc_Array - Anne -----Original Message----- From: Eric Chijioke [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 22, 2004 12:00 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Axis and .NET interoperability - Arrays I hesitate to file a bug, because I'm still not sure which array serialization scheme is correct (.NET or Axis). .NET wrappers the array elements in a container element, whereas Axis places them directly within the envelope's body root "method" element. -----Original Message----- From: Davanum Srinivas [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 14, 2004 2:52 PM To: [EMAIL PROTECTED] Cc: Thiele, Michael (LDS) Subject: Re: Axis and .NET interoperability - Arrays Guys, unless there is a bug report with a reproducible test case....we can't help you. -- dims On Tue, 14 Sep 2004 09:54:30 -0400, Eric Chijioke <[EMAIL PROTECTED]> wrote: > Thanks Michael, > This is very useful. > > You found that .NET 1.1 doc/literal doesn't work with Axis 1.2 Beta 3 > for complex objects, object arrays etc.. > How did they fail to interop in your tests? > I found that .NET wrappers arrays of complex objects with a container > element, whereas Axis simply serializes the array elements directly > inside the operation node (child node of soap body element), could you > corroborate this? > > Which is correct? (I don't see a directive in the spec anywhere) > > Thanks, > Eric > > -----Original Message----- > From: Thiele, Michael (LDS) [mailto:[EMAIL PROTECTED] > Sent: Tuesday, September 14, 2004 3:33 AM > To: [EMAIL PROTECTED] > Cc: Eric Chijioke > Subject: AW: Axis and .NET interoperability - Arrays > > Eric, > > we could not find sufficient information about interoperability in > detail and checked out those issues with Axis and .NET on our own. > Here is a list of out _primarily_ results. If we have some more time > we will publish testcases and bugreports... > > HTH. > > Please use a monospaced font to view the matrix > > Server: > Apache Axis 1.2 Beta 3 > > Clients: > Microsoft .NET 1.1 RPC/encoded------------| Microsoft .NET 1.1 > Doc/literal(wrapped)-| | Apache Axis 1.2 Beta 3 Doc/literal----| | | > Apache Axis 1.2 Beta 3 RPC/encoded--| | | | Apache Axis 1.1 final > RPC/encoded-| | | | | > | | | | | > Datatypes: | | | | | > Simple Datatypes..................x.x.x.x.x > String Arrays.....................x.x.x.x.- > Complex Objects...................x.x.x.-.x > Object Arrays.....................x.x.x.-.x > Complex Object w/.................x.x.x.-.x nested Object Arrays.. > Complex Objects w/................x.x.x.-.x nested Object w/ nested > Object Arrays > > Server: > Apache Axis 1.1 final > > Clients: > Microsoft .NET 1.1 RPC/encoded------------| Microsoft .NET 1.1 > Doc/literal(wrapped)-| | Apache Axis 1.2 Beta 3 Doc/literal----| | | > Apache Axis 1.2 Beta 3 RPC/encoded--| | | | Apache Axis 1.1 final > RPC/encoded-| | | | | > | | | | | > Datatypes: | | | | | > Simple Datatypes..................x.x.o.o.x > String Arrays.....................x.x.o.o.x > Complex Objects...................x.x.o.o.x > Object Arrays.....................x.x.o.o.x > Complex Object w/.................x.x.o.o.x nested Object Arrays.. > Complex Objects w/................x.x.o.o.x nested Object w/ nested > Object Arrays > > ------------------- > o: not tested > x: tested, works > -: tested, does not work > > Note 1: Of course, we changed the style (RPC/encoded, Doc/literal) on > the server side first and generated new stubs for each client. > Note 2: You have to transfer data to test interoperability. Only > validataing if stubs can be generated is not sufficient. > Note 3: There is no difference in interoperability if you are using > .NET > 1.1 with or without .NET Service Pack 1 and with or without Microsoft > WS Enhancements. > Note 4: There were no differences regarding this issues using > Doc/literal or Doc/wrapped in Axis 1.2 Beta 3 Note 5: Simple Datatypes: > int, Integer, double, Double, String, > java.util.Calendar(!) etc.; Complex Objects: like Address or so.; > Object Arrays like Address[]; Complex Object w/ nested Object Arrays > like Person with nested Address[]; > > As a result we cannot recommend using Doc/literal at this time if one > client is using .NET. > > Best regards > > Mummert Consulting AG > > Michael Thiele > Senior Consultant > Integrated Business Consulting > > Neue Weyerstr. 6 > D-50676 Koeln > > Tel: +49 221 92404-6130 > Fax: +49 221 92404-6199 > Mob: +49 178 6612185 > Mailto: [EMAIL PROTECTED] > http://www.mummert-consulting.de > > LDS-NRW > Mauerstr. 51, Raum 9.27 > 40476 Duesseldorf > Mailto:[EMAIL PROTECTED] > Durchwahl: +49 211 9449-2455 > > -----Ursprungliche Nachricht----- > Von: Eric Chijioke [mailto:[EMAIL PROTECTED] > Gesendet: Donnerstag, 9. September 2004 18:03 > An: [EMAIL PROTECTED] > Betreff: Axis and .NET interoperability - Arrays > > I have read a LOT of discussions concerning problems serializing and > deserializing arrays between an Axis server and a .NET client but > can't seem to find any definitive discussion/document. Is there one? > > Secondly, > > [...] > > Thanks > > Eric Chijioke > [EMAIL PROTECTED] > > -- Davanum Srinivas - http://webservices.apache.org/~dims/