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 Brian Atkins <br...@agilent.com> on 2003/07/14 20:06:03 UTC
Control over xsi:type in ArraySerializer?
I am building a client to interface to a service with no WSDL
specs available using Axis 1.1. I can model the data any way
I want in Java, but eventually need to generate the following
serialization:
<operation>
<opcode xsi:type="xsd:string">login</opcode>
<parms soapenc:arrayType="ns3:Item[2]" xsi:type="ns3:ItemList">
<item>
<name xsi:type="xsd:string">Username</name>
<value xsi:type="xsd:string">user<value>
</item>
<item>
<name xsi:type="xsd:string">Password</name>
<value xsi:type="xsd:string">pass</value>
</item>
</parms>
</operation>
I am using BeanSerializer to handle Operation and Item, but can't
seem to get the correct encoding for parms.
When I model the parms as an Item[] the ArraySerializer is called
and I get the following element:
<parms soapenc:arrayType="ns3:Item[2]" xsi:type="soapenc:Array">
When I model parms as an ItemList class which extends Vector, and
register VectorSerializer, I get the correct xsi:type of "ns3:ItemList",
I don't get soapenc:arrayType encoded at all.
I can't find any way to override xsi:type for this element using either
VectorSerializer or ArraySerializer, and really want to use one of those
rather than write my own.
Suggestions?
Thanks!
Brian ATkins
--
Brian Atkins brian_atkins@agilent.com (970) 288-2114
Agilent Technologies 4380 Ziegler Road - MS ISP Ft. Collins, CO 80525