wsdl message or not message What problem is
<wsdl: message> (or not)
<message>: What problem is it trying to solve? • Indicate the data that is sent to or received from a service • Typically the information sent is more than one thing – May contain optional pieces of data or things which occur repeatedly • Each thing is typed – At least two type systems are common on the Web: Schema, MIME – Others must also be supported, e. g. : Java
Header Block 2 Element 1 Element 2 Blockn Envelope Block 1 Body SOAP 1. 2 Data Model Elementn
SOAP 1. 2 DM with Attachments / PASWA Block 1 Block 2 Blockn Body Envelope Header “Outer” Package Element 1 Element 2 SOAP Envelope Elementn Other stuff
Options for WSDL 1. 2 • Leave <message> – Doesn’t support repeating stuff, optionality etc. – Type/element split causes binding headaches • Inline <part> within <operation> – See proposal by Sanjiva – Still has many of the problems of <message> • Just say input/output of an operation is a single complex. Type or element – Have to do some sleight-of-hand in the SOAP binding • Basically <soap: Body> already has a type (say x: t. Body), and this type would effectively be an alternate type – Non-XSD type systems
An Approach <operation name=“ncname”> <input complex. Type=“qname”/> <output complex. Type=“qname”/> </operation> • The type cannot be arbitrary – Having attributes means you cannot “literally” stuff it in <soap: Body> • We would need to go thru and precisely define what subset of complex. Type is legal and acceptable for a variety of bindings – Use the PASWA-style approach for non-XSD type systems • <element name=“xray” type=“xsd: binary” x: mime. Type=“image/jpeg”/> • <element name=“foo” type=“xsd: binary” x: java. Type=“java: a. b. C”/> • Having to name the type sucks
An Approach #2 <operation name=“ncname”> <input> <complex. Type> </input> <output> …. </output> </operation> • Alternatively we can define “input” as an extension of complex. Type: <complex. Type name=“input” extends=“complex. Type”> … </complex. Type> (See next page)
Syntax <operation name=“ncname”> <input> <xsd: sequence> </xsd: sequence> (etc. ) </input> … </operation>
Pros/Cons • Pros: – Eliminates <message>/<part> – SOAP doc/lit binding is immediate • PASWA style approach for attachments is also immediate – Gives optionality etc. as offered by XSD • Cons: – Sleight-of-hand for soap: Body type – Second class support for other type systems
- Slides: 9