100 likes | 181 Views
WSDL Usage Experience with XML Schema 1.0. Jonathan Marsh Chair, WS Description WG. <wsdl:description>. <xs:schema> <xs:element name="checkAvailability"> …. <xs:schema> <xs:element name="checkAvailabilityResponse"> …. <checkAvailability>
E N D
WSDL Usage Experience with XML Schema 1.0 Jonathan Marsh Chair, WS Description WG
<wsdl:description> <xs:schema> <xs:element name="checkAvailability"> … <xs:schema> <xs:element name="checkAvailabilityResponse"> … <checkAvailability> <checkIn>2005-06-19</checkIn> <checkOut>2005-06-21</checkOut> <roomType>single</roomType> </checkAvailability> <checkAvailabilityResponse> <rate>149.00</rate> </checkAvailabilityResponse> <soap:envelope> <soap:envelope> WSDL Overview <wsdl:interface name="reservationService"> … <wsdl:operation name="opCheckAvailability"> … <wsdl:binding type="http://www.w3.org/2005/05/wsdl/soap"> …
WSDL Overview • WSDL depends on XML Schema • Many similarities: • Component model • Import/Include • QName references/symbol spaces • Component designators • Some blurred lines of responsibility • WSDL-defined schema extensions • Versioning
Describing base64Binary <xs:schema xmlns:xmime="http://www.w3.org/2005/05/xmlmime"> <xs:complexType name="JPEGPictureType" xmime:expectedContentTypes="image/jpeg"> <xs:simpleContent> <xs:extension base="xs:base64Binary" /> </xs:simpleContent> </xs:complexType> <xs:element name="JPEGPicture" type="tns:JPEGPictureType" /> </xs:schema> see http://www.w3.org/TR/xml-media-types/
Describing References <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/03/addressing" xmlns:wsaw="http://www.w3.org/2005/05/addressing/wsdl" xmlns:fabrikam="http://example.com/fabrikam"> <wsa:Address>http://example.com/fabrikam/acct</wsa:Address> <wsa:Metadata> <wsaw:InterfaceName>fabrikam:Inventory</wsaw:InterfaceName> </wsa:Metadata> </wsa:EndpointReference>
Describing References <xs:schema xmlns:wsa="http://www.w3.org/2005/03/addressing" xmlns:fabrikam="http://example.com/fabrikam" xmlns:wsdlx="http://www.w3.org/@@@@/@@/wsdl-extensions"> <xs:import namespace="http://www.w3.org/2005/03/addressing"/> <xs:complexType name="InventoryReference" wsdlx:interface="fabrikam:Inventory"> <xs:complexContent> <xs:restriction base="wsa:EndpointReferenceType"/> </xs:complexContent> </xs:complexType> </xs:schema>
Versioning • LC124 only remaining open issue • Versioning of message structure is a common way to version a Web service. • Known problems with <xs:any> and UPA make versioning of message structure difficult.
LC124 proposal(s) • Allow, encourage, or mandate ignoring of unknown content in a message. • Define, reference, or suggest an algorithm such as Henry’s “validate-twice.” • Provide syntax to engage/suppress this behavior. • Model in WSDL or as schema extension.
LC124 questions • Schema descriptions primarily used for code generation, not by validation. • Does an ignore-unknown rule impact code generation or mapping of XML data to programming constructs? • Is this a WSDL problem or an XML Schema problem?