WSDL Which WSDL Style ? - PowerPoint PPT Presentation

About This Presentation
Title:

WSDL Which WSDL Style ?

Description:

17th October 2004 WSDL Which WSDL Style ? www.eu-egee.org EGEE is a project funded by the European Union under contract IST-2003-508833 Types of WSDL SOAP binding RPC ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 19
Provided by: Fab169
Category:

less

Transcript and Presenter's Notes

Title: WSDL Which WSDL Style ?


1
WSDL Which 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

3
Java method example
  • public void myMethod (int x)

4
RPC/Encoded WSDL
  • ltmessage namemyMethodRequestgt
  • ltpart namex typexsdint/gt
  • lt/messagegt
  • ltmessage nameempty/gt
  • ltportType namePTgt
  • ltoperation namemyMethodgt
  • ltinput messagemyMethodRequest/gt
  • ltoutput messageempty/gt
  • lt/operationgt
  • lt/portTypegt

Binding is RPC/encoded
5
SOAP message
  • ltsoapenvelopegt
  • ltsoapbodygt
  • ltmyMethodgt
  • ltx xsitypexsdintgtvaluelt/xgt
  • lt/myMethodgt
  • lt/soapbodygt
  • lt/soapenvelopegt

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

7
RPC/Literal WSDL
  • ltmessage namemyMethodRequestgt
  • ltpart namex typexsdint/gt
  • lt/messagegt
  • ltmessage nameempty/gt
  • ltportType namePTgt
  • ltoperation namemyMethodgt
  • ltinput messagemyMethodRequest/gt
  • ltoutput messageempty/gt
  • lt/operationgt
  • lt/portTypegt

Binding is RPC/literal
8
SOAP message
  • ltsoapenvelopegt
  • ltsoapbodygt
  • ltmyMethodgt
  • ltxgtvaluelt/xgt
  • lt/myMethodgt
  • lt/soapbodygt
  • lt/soapenvelopegt

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

10
Document/encoded
  • Not implemented !

11
Document/literal WSDL
  • lttypesgt
  • ltschemagt
  • ltelement namexElement typexsdint/gt
  • lt/schemagt
  • lt/typesgt
  • ltmessage namemyMethodRequestgt
  • ltpart namex elementxElement/gt
  • lt/messagegt
  • ltmessage nameempty/gt
  • ltportType namePTgt
  • ltoperation namemyMethodgt
  • ltinput messagemyMethodRequest/gt
  • ltoutput messageempty/gt
  • lt/operationgt
  • lt/portTypegt

12
SOAP message
  • ltsoapenvelopegt
  • ltsoapbodygt
  • ltxElementgtvaluelt/xElementgt
  • lt/soapbodygt
  • lt/soapenvelopegt

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

14
Document/wrapped WSDL
  • lttypesgt
  • ltschemagt
  • ltelement namemyMethod/gt
  • ltcomplexTypegt
  • ltsequencegt
  • ltelement namex typexsdint/gt
  • lt/sequencegt
  • lt/complexTypegt
  • lt/elementgt
  • lt/schemagt
  • lttypesgt
  • ltmessage namemyMethodRequestgt
  • ltpart nameparameters elementmyMethod/gt
  • lt/messagegt
  • ltmessage nameempty/gt
  • ltportType namePTgt
  • ltoperation namemyMethodgt
  • ltinput messagemyMethodRequest/gt

WSDL schema has a wrapper around the parameters
15
SOAP message
  • ltsoapenvelopegt
  • ltsoapbodygt
  • ltmyMethodgt
  • ltxgtvalueltxgt
  • lt/myMethodgt
  • lt/soapbodygt
  • lt/soapenvelopegt

16
Characteristics
  • Input message has a single part
  • Part is an element
  • Element has the same name as the operation
  • Elements complex type has no attributes

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.

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.
Write a Comment
User Comments (0)
About PowerShow.com