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 Ricky Ho <ri...@cisco.com> on 2002/08/26 18:29:17 UTC

Does SoapEncoding compliant with WSDL ?

In WSDL, every complex type is described in XML-Schema.  So if you have a 
"Customer" who has an "Address", the XML schema will look as the following ...

<complexType name="Customer">
	<sequence>
		<element name="name" type="xsd:string"/>
		<element name="addr" type="tns:Address"/>
	</sequence>
</complexType>

<complexType name="Address">
	<sequence>
		<element name="street" type="xsd:string"/>
		<element name="city" type="xsd:string"/>
	</sequence>
</complexType>


However, if you pass a "Customer" object as a parameter in a SOAP request, 
the "soap-encoding" will encode the parameter into ...

<multiRef id="id0" xsi:type="Customer">
	<name>....</name>
	<addr href="#id1"/>
</multiRef>
<multiRef id="id1" xsi:type="Address">
	<street>....</street>
	<city>....</city>
</multiRef>


Therefore, the XML after encoding is using a "href" but the WSDL is saying 
that the Address should be embedded into the Customer.  So it seems SOAP 
encoding and WSDL is inconsistent.

It seems to me there is a fundamental mismatch between XML schema and SOAP 
encoding.  XML schema doesn't have a very limited concept of reference 
(id/idref is typeless), complex object will mainly be embedded into another 
complex object.  However, SOAP encoding almost use reference 
exclusively.  Complex object will has a "href" into another complex object.

It seems to me that the problem can be solved if we ....
1) Add a "typed reference" concept in XML-schema.
2) Schema validation can traverse across the "href"

Comments and thoughts ??

Best regards,
Ricky