wsdl web services description language n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
WSDL Web Services Description Language PowerPoint Presentation
Download Presentation
WSDL Web Services Description Language

Loading in 2 Seconds...

play fullscreen
1 / 51
elton-conner

WSDL Web Services Description Language - PowerPoint PPT Presentation

131 Views
Download Presentation
WSDL Web Services Description Language
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. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. WSDLWeb Services Description Language Presented By: -Maitreya Natu

  2. Outline • Introduction • Document Structure • Examining WSDL • Web Services, Grids, Agents and WSDL • References

  3. What? • Describes the technical details of how a Web Service works • WSDL is a simple XML grammar for describing how to communicate with a Web service • It defines the messages (both abstract and concrete) that are sent to and from a service • It defines logical collections of messages (“port type”, “interface”) • It defines how a given “port type” is bound to particular wire protocols • It defines where the service is located • Enables one to separate the description of abstract functionality offered by a service from concrete details.

  4. Who? • WSDL 1.1 specification exists as a W3C Note, co-submitted by representatives of Microsoft and IBM

  5. Why? • Classic IDL Model • Almost all distributed systems have a language for describing interfaces • IDL in DCE and CORBA • MIDL in COM and DCOM • Definitions are processed by an IDL compiler to generate • stubs for clients which look like local function calls • Dispatch routines for the server that invoke the developer’s code • WSDL acts as an IDL for Web Services distributed programming model • defines the communication protocol, the data transfer syntax and location of the endpoint

  6. How? • Developers use tool kits capable of reading and writing WSDL • Perl SOAP::Lite • Constructs a local stub of a remote service object using WSDL document as its template • Programmer requests the local stub which silently communicates with remote server • SOAP::Lite -> service (http://api.google.com/GoogleSearch.wsdl) -> do GoogleSearch(@parameters); • Microsoft’s .Net Web Services provides tools for consuming and producing WSDL documents • wsdl.exe, creates a proxy class from a WSDL description

  7. When? • WSDL 1.1, published as a W3C Note in March 2001 • WSDL 1.2, published as W3C Working Draft in June 2003

  8. Opinion • Principal advantage • Wide acceptance as a fundamental component of Web services • Principal Disadvantage • Separates documentation from service • Additional work to discover technical specifications • Stale WSDL files!

  9. SOAP and WSDL • SOAP is a standard for communicating pure content. • It needs a language to describe the content • SOAP messages carry type information • It needs information about the service name, number of parameters and types • WSDL automates the generation of client stubs for web services in a truly language and platform independent way

  10. Document Structure • Defines SOAP messages in a platform and language • independent manner • Helps define set of services that several websites can implement Abstract Section Site specific matters like serialization, bindings etc. Concrete Section

  11. Document Structure Types Messages Operations Port Type Machine and language independent type definitions Abstract typed definition of data communicated (function parameters) Bindings Port Service Abstract description of supported action Abstract set of operations supported

  12. Document Structure Types Messages Operations Port Type A concrete protocol and data format Specification of a port type Bindings Port Service A single endpoint defined as a combination of binding and network address A collection of related endpoints

  13. Document Structure <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions>

  14. Definitions <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • Declares that document is XML • Defines the root element in the WSDL • document <definitions> • Namespace declarations

  15. Definitions <?xml version=“1.0”?> <definitions name=“StockQuote” targetNameSpace=“http://example.com/stockquote.wsdl” xmlns:tns=“http://example.com/stockquote.wsdl” xmlns:xsdl=“http://example.com/stockquote.xsd” xmlns:soap=“http://scemas.xmlsoap.org/wsdl/soap/” xmlns=“http://schemas.xmlsoap.org/wsdl/”> : : : : : </definitions> • Declares that document is XML • Defines the root element in the WSDL • document <definitions> • Namespace declarations

  16. What are Namespaces for? • To avoid naming conflicts • 2 services can use the same name only if they mean exactly the same thing in both instances • With 2 distinct namespaces, one web service “add” can mean a different thing than other web service “add” • Namespace attribute declares a shorthand for each namespace used in the document • http://www.infotects.com/addService#add ~ carlos:add • If carlos is declared as a shorthand for http://www.infotects.com/addService • Location pointed by URI does not have to be a real web location, they are use to guarantee uniqueness • A GUID can be used instead • “335DB901-D44A-11D4-A96E-0080AD76435D” is a valid namespace designator

  17. Types <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • Declares the application specific data types • XML Schema allows for definition of complex • data types which are equivalent to C structs

  18. Types <types> <schema targetNameSpace=“http://example.com/stockquote.wsdl” xmlns=“http://www.w3.or/2000/10/XMLSchema”> <element name=“TradePriceRequest”> <complexType> <all> <element name=“tickerSymbol” type=“string”/> <all> <complexType> <element> <element name=“TradePrice”> <complexType> <all> <element name=“price” type=“float”/> <all> <complexType> <element> <schema> </types> • Declares the application specific data types • XML Schema allows for definition of complex • data types which are equivalent to C structs

  19. Messages <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • Abstract definition of the data being transmitted • Consists of logical parts, each of which is • associated with a type definition within some • type system

  20. Messages <message name=“GetLastTradePriceInput”> <part name=“body” element=“xsdl:TradePriceRequest”/> <message> <message name=“GetLastTradePriceOutput”> <part name=“body” element=“xsdl:TradePrice”/> <message> • Abstract definition of the data being transmitted • Consists of logical parts, each of which is • associated with a type definition within some • type system (here an XML schema defined in • types section)

  21. Messages <definitions …> <types> <schema …> <element name=“PO” type=“tns:POType”/> <complexType name=“POType”> <element name=“id” type=“string”/> <element name=“name” type=“string”/> <element name=“items”> <complexType> <all> <element name=“item” type=“int”> </all> </complexType> </element> </complexType> </schema> </types> <messages name=“PO”> <part name=“po” element=“tns:tns:PO”/> </message> <definitions> Type Definition Message part

  22. Messages <definitions …> <types> <schema …> <element name=“PO” type=“tns:POType”/> <complexType name=“POType”> <element name=“id” type=“string”/> <element name=“name” type=“string”/> <element name=“items”> <complexType> <all> <element name=“item” type=“int”> </all> </complexType> </element> </complexType> </schema> </types> <messages name=“PurchaseOrder”> <part name=“pOrder” element=“tns:PO”/> </message> <definitions> Type Definition Message part

  23. Port Type <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • A set of abstract operations • Each operation declares the abstract messages • involved

  24. Port Type <portType name=“StockQuotePortType”> <operation name=“GetLastTradePrice”> <input message=“tns:GetLastTradePriceInput”/> <output message=“tns:GetLastTradePriceOutput”/> </operation> </portType> • A set of abstract operations • Each operation declares • The name of method • Parameters • Types of each parameter

  25. Port Type <types> <schema …> <element name=“TradePriceRequest”>… type=“string”…</element> <element name=“TradePrice”> … type=“float” …</element> </schema> </types> <message name=“GetLastTradePriceInput”> <part name=“body” element=“xsdl:TradePriceRequest”/> <message> <message name=“GetLastTradePriceOutput”> <part name=“body” element=“xsdl:TradePrice”/> <message> <portType name=“StockQuotePortType”> <operation name=“GetLastTradePrice”> <input message=“tns:GetLastTradePriceInput”/> <output message=“tns:GetLastTradePriceOutput”/> </operation> </portType> Types Message Operations & Port Type float GetLastTradePrice (string TradePriceRequest)

  26. Operations • WSDL operations refer to 4 transmission primitives that an endpoint can support • One-way: The endpoint receives a message • Request-response: The endpoint receives a message, and sends a correlated message • Solicit-response: The endpoint sends a message, and receives a correlated message • Notification: The endpoint sends a message • These primitives are abstractly defined; a given binding describes the concrete correlation information

  27. Operations: one way operation <portType …> <operation …> <input name=“…” message=“…”/> </operation> </portType>

  28. Operations: Request-response operation <portType …> <operation …> <input name=“…” message=“…”/> <output name=“…” message=“…”/> <fault name=“…” message=“…”/> </operation> </portType>

  29. Operations: Solicit-response operation <portType …> <operation …> <output name=“…” message=“…”/> <input name=“…” message=“…”/> <fault name=“…” message=“…”/> </operation> </portType>

  30. Operations: Notification operation • <portType …> • <operation …> • <output name=“…” message=“…”/> • </operation> • </portType>

  31. Bindings <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • defines a concrete protocol and data format • specification for a particular port type • specifies how each operation call and response • is sent on the wire (protocol, serialization and • encoding)

  32. Bindings <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding>

  33. Bindings <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding> • type: refers to port Type • name: referred by ‘Port’ element in ‘Services’ • section

  34. Bindings <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding> • style: (rpc or document) • transport: specifies the underlying protocol • (here HTTP SOAP) • MSTK2 extension element, sepcifies preferred • encoding as “UTF-8”

  35. Bindings <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding> • corresponds to elements in PortTypes section

  36. Bindings <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding> • SOAP specific URI: gets used in SOAP message • in SOAP Action header verbatim • Used for HTTP binding to identify the intent of • the message

  37. Bindings • Specifies what gets into the body of the • resulting SOAP message <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding>

  38. Bindings • Specifies whether the data is “encoded” or • “literal” <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:body use=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding>

  39. Bindings • prevents name clashing • this URI is used verbatim in the resulting SOAP • message <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:bodyuse=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:bodyuse=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding>

  40. Bindings • determines the encoding style if use=“encoded” • For SOAP encoding, this should have the URI • value of • “http://schemas.xmlsoap.org/soap/encoding/” <binding name=“StockQuoteSoapBinding” type=“tns:StockQuotePortType”> <stk:binding preferredEncoding=“UTF-8” /> <soap:binding style=“rpc” transport=“http://schemas.xmlsoap.org/soap/http/”> <operation name=“GetLastTradePrice”> <soap:operation soapAction = “http://example.com/GetLastTradePrice”/> <input> <soap:bodyuse=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </input> <output> <soap:bodyuse=“encoded” namespace=“http://tempuri.org/message/” encodingStyle= “http://schemas.xmlsoap.org/soap/encoding/” /> </output> </operation> </binding>

  41. Ports & Services <definitions> <types> Definition of types… … </types> <message> Definition of a message… … </message> <portType> <operation> <input message/> <output message/> </operation> </portType> <binding portType=“…”> <operation> <input message/> <output message/> </operation> </binding> <service> <port binding= “...”> Network Address… … </port> </service> </definitions> • Port: defines an individual endpoint by • specifying a single address for a binding • Service: groups a set of related ports together

  42. Ports <service name=“StockQuoteService”>> <documentation> My First service </documentation> <port name=“StockQuotePort” binding=“tns:StockQuoteBinding”> <soap:address location=“http://example.com/stockquote”/> </port> </service> • Ports: associates a location with a binding in a • one to one fashion

  43. Ports <service name=“StockQuoteService”>> <documentation> My First service </documentation> <port name=“StockQuotePort” binding=“tns:StockQuoteBinding”> <soap:address location=“http://example.com/stockquote”/> </port> </service> Port Name (to differentiate among multiple ports) Binding name as defined in Bindings section URL associated with the binding

  44. Services <service name=“StockQuoteService”>> <documentation> My First service </documentation> <port name=“StockQuotePort” binding=“tns:StockQuoteBinding”> <soap:address location=“http://example.com/stockquote”/> </port> </service> • None of the ports communicate with each other • several ports can use same port type but employ • different bindings or addresses • There can be more than one service elements • Ports can be grouped in a service • according to URL • according to protocol

  45. Major Changes in WSDL V 1.2 • Port Type is called Interface • Interface Inheritance feature is added • Better definition of HTTP 1.1 and SOAP 1.2 binding • Describes how to use WSDL with SOAP, HTTP and MIME

  46. Examining WSDL • Verbosity • WSDL First • Too much flexibility adds overhead • Get rid of difference between document and RPC Binding style • Get rid of difference between Literal and Encoded Binding style • Why 4 ways to define bindings?

  47. Grids and WSDL • OGSA designed for both persistent and transient services together. • This will be achieved through • Development of WSDL conventions • Standard WSDL interfaces • Behaviors of core services • MatchMaker protocol to link services

  48. Agents and WSDL • Agent ontology is defined using XML schema components • Behavior as a WSDL interface • Performatives as operations with request response messages • Reference to external framework by Bindings between abstract definition and implementation • Agent Service logically as Endpoint with a physical location and port

  49. SOAP/WSDL vs ACLs • ASK, REPLY and TELL: 4 WSDL types of messages • ACL Content: Message Tags • SENDER: defined in WSDL message as Service • ERROR and SORRY: WSDL Fault Tag • Ontology : XML Schema • Agent Management Systems : SOAP for Transport • Sophisticated message transport services: ??? • Services requiring Negotiation: ???

  50. Upcoming plans • Web Services: Standardized enterprise components offered across the Web • Grid Services: scientific/ computing resources that facilitate large-scale scientific research • Multi-Agent systems: heterogeneous agents that cooperate or compete to solve distributed AI problems • Key research challenges are: • Support automated interoperability without human intervention • Semantic Web Services: to make services accessible and understandable • Emerging ontologies (DAML-S): to construct semantically rich service description