1 / 18

WSDL Which WSDL Style ?

WSDL Which WSDL Style ?. 17 th October 2004. www.eu-egee.org. EGEE is a project funded by the European Union under contract IST-2003-508833. Types of WSDL SOAP binding. RPC/encoded RPC/literal Document/encoded Document/literal. Java method example. public void myMethod (int x);.

afric
Download Presentation

WSDL Which WSDL Style ?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. WSDLWhich WSDL Style ? 17th October 2004 www.eu-egee.org EGEE is a project funded by the European Union under contract IST-2003-508833

  2. Types of WSDL SOAP binding • RPC/encoded • RPC/literal • Document/encoded • Document/literal WSDL, 17th October 2004 - 2

  3. Java method example public void myMethod (int x); WSDL, 17th October 2004 - 3

  4. RPC/Encoded WSDL <message name=“myMethodRequest”> <part name=“x” type=“xsd:int”/> </message> <message name=“empty”/> <portType name=“PT”> <operation name=“myMethod”> <input message=“myMethodRequest”/> <output message=“empty”/> </operation> </portType> Binding is RPC/encoded WSDL, 17th October 2004 - 4

  5. SOAP message <soap:envelope> <soap:body> <myMethod> <x xsi:type=“xsd:int”>value</x> </myMethod> </soap:body> </soap:envelope> WSDL, 17th October 2004 - 5

  6. Advantages/disadvantages • Advantages • Simple WSDL • Operation name appears in the message • Disadvantages • Type encoding information overhead • SOAP message cannot be validated except against WSDL WSDL, 17th October 2004 - 6

  7. RPC/Literal WSDL <message name=“myMethodRequest”> <part name=“x” type=“xsd:int”/> </message> <message name=“empty”/> <portType name=“PT”> <operation name=“myMethod”> <input message=“myMethodRequest”/> <output message=“empty”/> </operation> </portType> Binding is RPC/literal WSDL, 17th October 2004 - 7

  8. SOAP message <soap:envelope> <soap:body> <myMethod> <x>value</x> </myMethod> </soap:body> </soap:envelope> WSDL, 17th October 2004 - 8

  9. Advantages/Disadvantages • Advantages • WSDL is simple • Operation name appears in the message • Type encoding information is minimal • Disadvantages • Nearly all the definitions in WSDL so not independently validatable WSDL, 17th October 2004 - 9

  10. Document/encoded • Not implemented ! WSDL, 17th October 2004 - 10

  11. Document/literal WSDL <types> <schema> <element name=“xElement” type=“xsd:int”/> </schema> </types> <message name=“myMethodRequest”> <part name=“x” element=“xElement”/> </message> <message name=“empty”/> <portType name=“PT”> <operation name=“myMethod”> <input message=“myMethodRequest”/> <output message=“empty”/> </operation> </portType> WSDL, 17th October 2004 - 11

  12. SOAP message <soap:envelope> <soap:body> <xElement>value</xElement> </soap:body> </soap:envelope> WSDL, 17th October 2004 - 12

  13. Advantages/Disadvantages • Advantages • No type encoding information • The body of the soap message is all defined in a schema and so can be validated independently • Disadvantages • WSDL is more complicated • Operation name is lost WSDL, 17th October 2004 - 13

  14. Document/wrapped WSDL <types> <schema> <element name=“myMethod”/> <complexType> <sequence> <element name=“x” type=“xsd:int”/> </sequence> </complexType> </element> </schema> <types> <message name=“myMethodRequest”> <part name=“parameters” element=“myMethod”/> </message> <message name=“empty”/> <portType name=“PT”> <operation name=“myMethod”> <input message=“myMethodRequest”/> <output message=“empty”/> </operation> </portType> WSDL schema has a wrapper around the parameters WSDL, 17th October 2004 - 14

  15. SOAP message <soap:envelope> <soap:body> <myMethod> <x>value<x> </myMethod> </soap:body> </soap:envelope> WSDL, 17th October 2004 - 15

  16. Characteristics • Input message has a single part • Part is an element • Element has the same name as the operation • Element’s complex type has no attributes WSDL, 17th October 2004 - 16

  17. Advantages/disadvantages • Advantages • No type encoding information • Soap body is defined in a schema – validation • Method name in the soap message • Disadvantages • WSDL is complicated • Generally this is the best style to use. WSDL, 17th October 2004 - 17

  18. When not to use document/wrapped • Document literal wrapped style does not allow for overloading • Cannot have two elements with the same name in XML (element has to have same name as operation) • In this case you may wish to use RPC/literal so that the operation name is available. WSDL, 17th October 2004 - 18

More Related