Hi,

I am developing Web Service client in Java using Axis 1.1. I am facing problem the way 
Axis is serializing array elements for 2 different schema types. This webservice uses 
doc/lit.

1)  Reference Type element

        <s:element name="symbol" type="s:string"/>
        <s:element name="Test">
                <s:complexType>
                        <s:sequence>
                                <s:element ref="symbol"  maxOccurs="25"/>     <!-- 
Referring to global symbol element -->
                        </s:sequence>
                </s:complexType>
        </s:element>

If you create a client using WSDL2Java tool then Axis uses Soap Encoding to serialize 
Symbol array.

<Test xmlns="http://tempuri.org/";>
                        <symbol soapenc:arrayType="xsd:string[3]" 
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";>
                                <item xmlns="">Symbol1</item>
                                <item xmlns="">Symbol2</item>
                                <item xmlns="">Symbol3</item>
                        </symbol>
</Test>


2) Direct element

        <s:element name="Test">
                <s:complexType>
                        <s:sequence>
                                <s:element name="symbol"  maxOccurs="25" 
type="s:string"/>    <!--Direct element, no reference -->
                        </s:sequence>
                </s:complexType>
        </s:element>

then Array is serialized as follows:

<Test xmlns="http://tempuri.org/";>
                <symbol>Symbol1</symbol>
                <symbol>Symbol2</symbol>
                <symbol>Symbol3</symbol>
</Test>

I tried to generate clients for above both the scenarios using .NET. It always use XML 
serializing (as in case 2) and not Soap Encoding.
Is there anyway I can stop Soap Encoding while serializing arrays in Axis1.1?

I will appreciate your help.

Thanks,
-Himmat

Reply via email to