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 jagannath <ja...@adventnet.com> on 2004/04/16 10:00:01 UTC

ArraySerializer question

Hi,

I have a question on ArraySerialization. I have defined my WebService to 
return some custom object arrays. I have written serializer for the 
custom object.
In my wsdd file I have put the below entries

<typeMapping xmlns:ns1="urn:AdventNetSoapAgentTypes"
      qname="ns1:ArrayOfString"
    type="java:java.lang.String[]"
    serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
    deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />

<typeMapping xmlns:ns1="urn:AdventNetSoapAgentTypes"
      qname="ns1:ArrayOfCustomer"
    type="java:com.samples.Customer[]"
    serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
    deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />


Now when I generate the WSDL file using the AxisServlet, only the 
complexElement for ArrayOfString gets created as shown below

<complexType name="ArrayOfString">
    <complexContent>
        <restriction base="soapenc:Array">
            <attribute ref="soapenc:arrayType" 
wsdl:arrayType="xsd:string[]"/>
        </restriction>
    </complexContent>
</complexType>

Similar entries for my custom object does not get created.

My question is am I not supposed to use 
"/org.apache.axis.encoding.ser.ArraySerializerFactory/" for my custom 
object arrays.

Please provide your comments.

Regards,

-- 
-------------------------------------------------------
Jagannath.C
AdventNet ManageEngine JMX Studio
Off : 2243115 Extn:5252
Res: 22790045
Nortel: +91-925-895-6380
www.adventnet.com
-------------------------------------------------------