As far as I know, xsi:type attribute is only added for rpc style
service invocation.
I never see xsi:type in document style service. If Axis2 do this way,
it means the serializer will add the xsi:type attribute. So does it
mean that the serializer/deserializer is Axis2 dependent?

By the way, when InterfaceType is used, what I am expecting is that
abstract attribute is set to true like the one in
http://www.w3.org/TR/xmlschema-0/#abstract, so that xsi:type attribute
is forced in the XML instance.

But in the WSDL generated by Java2WSDL does not contains a line like
<xs:element type="stn_1:InterfaceType1" name="InterfaceType1" abstract="true"/>

Can any Axis2 guru explain that?


Regards,
Xinjun


On 6/28/06, Joshua Fox <[EMAIL PROTECTED]> wrote:
Xinjun,


> At runtime, how can Axis2 decide the actual type of the input object?

It works because Axis2 is smart enough to add Runtime Type Information to
the XML. See xsi:type attributes in the sample below. This is not the usual
appearance of the XML in document-literal/wrapped SOAP calls. Indeed, Axis
seems to add the xsi:type tags even where not strictly needed.

Joshua



<?xml version="1.0 "?>

<soapenv:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2001/XMLSchema";

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ ">

<soapenv:Body>

<getVehicleColor xmlns="urn:VehicleServices">

<in0 xsi:type="ns1:Truck "

xmlns:ns1="urn:VehicleServices">

<ns1:make xsi:type="xsd:string">Toyot</ns1:make >

<ns1:size xsi:type="xsd:int">2</ns1:size >

<ns1:numTrailers xsi:type="xsd:int">7</ns1:numTrailers >

</in0>

</getVehicleColor>

</soapenv:Body>

</soapenv:Envelope>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to