10.4. Compatibility
Document/literal and RPC-encoded SOAP were already briefly discussed. The terms themselves mean that the SOAP body can be either RPC-based or Document-based, and the method parameters described within the SOAP body are either Literal or Encoded.
Literal maps method parameters to an XSD schema for each parameter. Each parameter has an element that contains a literal string describing type. These types are mapped to the xsd namespace defined in the SOAP envelope:
<!-- Used by ASP.NET Web services -->
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xmlns:xsd=http://www.w3.org/2001/XMLSchema
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ >
<soap:Body>
<IsValid xmlns="http://192.168.1.100/">
<City>string</City>
<Zip>string</Zip>
</IsValid>
</soap:Body>
</soap:Envelope>
Encoded means that the parameters are encoded as described in Section 5 of the SOAP specification.[2] A complex type is defined for each parameter:
[2] This specification can be found at http://www.w3c.org.
<!-- Used by remoting and other non-.NET SOAP clients --> <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/ xmlns:tns=http://192.168.1.100/ xmlns:types=http://192.168.1.100/encodedTypes xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ > <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> ...
Get Object-Oriented Programming with Visual Basic .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.