Hi all,

 

We currently have a java application that provides a number of axis web
services that are rpc/encoded and have be recently experiencing problems
with integrating into web services client tools such as Biztalk. The
cause of our problem was around the encoding of arrays. In order to be
WS-I compliant we now expose wrapped/literal web services.  

 

This has worked perfectly when the client application is using Axis but
there is an interoperability problem when the client is a .net
application. The problem only occurs when you returning an object that
has an array of other objects. I hope the following environment
explanation helps you understand the problem: 

 

Axis generated the following XML schema of the return object (I have
only included the return object definition).

 

 

<complexType name="ReturnType">

    <sequence>

      <element name="myArray" nillable="true"
type="impl:ArrayOfMyArrayType "/>

   </sequence>

</complexType>

 

<complexType name="ArrayOfMyArrayType">

    <sequence>

      <element maxOccurs="unbounded" minOccurs="0" name="item"
type="impl:ArrayType"/>

    </sequence>

</complexType>  

 

<complexType name=" ArrayType ">

    <sequence>

      <element name="value" type="xsd:int"/>

   </sequence>

</complexType>

 

 

The response message generated by axis looks like:

 

<soapenv:Body>

         <myMethodResponse xmlns="http://test ">

            <myMethodReturn>

               <myArray>

                  <myArray>

                     <channelId>2</channelId>

                 </myArray>

             </myArray>

          </myMethodReturn>

      </myMethodResponse>

</soapenv:Body>

 

 

The problem is that there are nested myArray element when the xml schema
within the WSDL defines that there should be an item element. For some
reason an axis client will accept this odd nesting of elements but a
.net client always reports that the array is empty. 

 

Does anyone know of a way of making the response message look like:

 

<soapenv:Body>

         <myMethodResponse xmlns="http://test ">

            <myMethodReturn>

               <myArray>

                  <item>

                     <channelId>2</channelId>

                 </item>

             </myArray>

          </myMethodReturn>

      </myMethodResponse>

</soapenv:Body>

 

Many Thanks,

 

Chris

 

 

 

 

 

 

Reply via email to