1 / 57

Web Services Technologies

Web Services Technologies. Jacek Kopeck ý. Overview. Introduction to Web Service technologies SOAP WSDL Further selected specfications. About Me. If I seem dry, now you'll know why Worked at Web Services Platform company Got involved in W3C SOAP 1.2 WSDL 2.0 Moved to STI Innsbruck

coye
Download Presentation

Web Services Technologies

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. Web Services Technologies Jacek Kopecký

  2. Overview • Introduction to Web Service technologies • SOAP • WSDL • Further selected specfications

  3. About Me • If I seem dry, now you'll know why • Worked at Web Services Platform company • Got involved in W3C • SOAP 1.2 • WSDL 2.0 • Moved to STI Innsbruck • Working on connecting the lower layers to semantics

  4. SOA Recap (in my words) • Service-oriented architecture • For large-scale distributed computing • Coarse-grained service interfaces • Evolvability, manageability • Interoperability within and among enterprises • Inspired by the goals of CORBA and such

  5. Web Services: Main Points • Technology for SOA • Client-server messaging approach • With predefined Message exchange patterns • Independent of network protocols • Application-specific interfaces • Similar to Remote Procedure Calls – RPC • Contrasted to REST and the Web • Most data in XML • Descriptions in XML Schema

  6. RPC vs. Web Services • RPC aims to hide the network • Distributed system looks like a local system • Some calls happen to go over the network • But network is important • Latency, bandwidth • Reliability – connection, nodes • RPC is harmful • Web Services keep the network in mind

  7. Web Services Basics registry discover services publish descriptions client service (provider) invoke

  8. Web Services Basics • SOAP • An XML messaging protocol • WSDL + XML Schema • An XML interface definition language • UDDI • A business-oriented service registry

  9. More WS Specifications • Modular approach to adding features: • Attachments • Addressing, Policy • … many others • W3C, OASIS, WS-I • Plus ad-hoc industry alliances

  10. SOAP

  11. SOAP in Detail: Overview • née Simple Object Access Protocol • In fact, simple messaging protocol • Current version: 1.2 @ W3C • Message structure • Processing model • Protocol bindings

  12. SOAP Messages • XML Envelope • Body • Application payload • Faults • Headers • Metadata, processing instructions • Possibly mandatory (mustUnderstand) • Possibly targeted at intermediaries

  13. SOAP Message Example <soap:Envelope> <soap:Header> <wsa:MessageID> unique ID </wsa:MessageID> <wsa:ReplyTo> endpoint </wsa:ReplyTo> </soap:Header> <soap:Body> <bank:BalanceRequest> data </bank:BalanceRequest> </soap:Body> </soap:Envelope>

  14. SOAP Message Envelope Body Header

  15. SOAP Processing Model • Processing a message • Selecting headers targeted at me • The current intermediary or ultimate receiver • Checking for understanding • Do I understand all that is targeted at me and marked as mustUnderstand? • Processing everything in some order

  16. SOAP MustUnderstand • Mandatory headers • The receiver must understand them • Implies agreement to act in accordance • Non-mandatory headers can be ignored • This mechanism enables gracious evolution • If a new feature can be ignored, its introduction won't harm older nodes • If a new feature must be understood, its introduction will be discovered early by older nodes, without unexpected behavior

  17. SOAP Protocol Bindings • Transporting the message over a network • Addressing • What an endpoint address looks like • Serialization • How to put the XML message in on-the-wire bits and bytes • Connection • How to send the bits to the endpoint

  18. SOAP HTTP Binding • Addressing: URIs • Serialization: HTTP message body • Media type application/soap+xml • Connection: TCP • Possibly Web-friendly • SOAP 1.1 only used HTTP POST

  19. SOAP MEPs • Message Exchange Patterns • Request-Response • Input message followed by output or fault • SOAP-Response • Request without SOAP (e.g. HTTP GET) • SOAP output or fault

  20. SOAP Summary • Still pretty simple even if the name doesn’t say so any more • Extremely extensible • HTTP binding for easy communication • The value of SOAP: XML and Processing Model

  21. Attachments • XML is nice, but… not binary • XOP: XML-binary Optimized Packaging • Binary data in XML logically in the tree • On serialization, it is outside, raw, efficient • MIME multipart message • MTOM: XOP for SOAP • Message Transfer Optimization Mechanism • Extends SOAP HTTP binding

  22. WS-Addressing • Simple routing protocol • Endpoint References for addressing • With parameters or metadata • Message headers for routing & correlation

  23. WSA Msg Info Headers • To – let the middleware deliver the message • From, ReplyTo, FaultTo – channels back • MessageID, RelatesTo – simple correlation • Action – semantics implied by the message <S:Header> <wsa:MessageID> unique ID </wsa:MessageID> <wsa:ReplyTo> endpoint </wsa:ReplyTo> <wsa:To> address </wsa:To> <wsa:Action> URI </wsa:Action> </S:Header>

  24. Web Service Description Language WSDL

  25. WSDL in Detail: Overview • Web Service Description Language • Interface Definition Language (IDL) for Web Services • Current version: 2.0 @ W3C • Version 1.1 still in widespread use • Interface – reusable, abstract • Operations with MEPs • Binding – reusable, concrete • Service implements an interface • Endpoints use bindings

  26. WSDL Component Structure service service service

  27. WSDL Component Structure service service service endpoint endpoint

  28. WSDL Component Structure interface interface interface service service service endpoint endpoint

  29. WSDL Component Structure interface interface interface operation operation operation fault fault fault service service service endpoint endpoint

  30. WSDL Component Structure interface interface interface operation operation operation fault fault fault binding interface interface service service service endpoint endpoint

  31. WSDL Component Structure interface interface interface operation operation operation fault fault fault binding interface interface operation operation operation service service service fault fault fault endpoint endpoint

  32. WSDL Component Structure interface operation operation operation fault fault fault

  33. WSDL Component Structure interface operation operation operation message ref msg ref msg ref fault ref msg ref msg ref fault fault fault

  34. WSDL Component Structure interface operation operation operation types message ref msg ref msg ref fault ref msg ref msg ref fault fault fault

  35. types element declaration operation operation type definition fault fault WSDL Component Structure interface operation operation operation message ref msg ref msg ref fault ref msg ref msg ref fault fault fault

  36. types element declaration operation operation type definition fault fault WSDL Component Structure interface operation operation operation message ref msg ref msg ref fault ref msg ref msg ref fault fault fault

  37. WSDL Interface • Design of application interface • Possibly extending other interfaces • Operations • Message exchange pattern (MEP) • Input/output messages, faults • Referencing XML elements defined in types • Faults • Used and reused by operations

  38. WSDL Interface Example <interface name=“Banking”> <operation name=“transfer” pattern=“http://www.w3.org/2004/08/wsdl/in-out”> <input element=“Transfer”/> <output element=“Balance”/> <outfault ref=“InvalidBankAccount”/> <outfault ref=“InsufficientFunds”/> </operation> <operation name=“balance” safe=“true” pattern=“http://www.w3.org/2004/08/wsdl/in-out”> <input element=“BalanceRequest”/> <output element=“Balance”/> <outfault ref=“InvalidBankAccount”/> </operation> <fault name=“InvalidBankAccount” element=“InvalidAccountInfo” /> <fault name=“InsufficientFunds” element=“InsufficentFundsInfo” /> </interface>

  39. Invocation: In-only In-out Out-only Out-in Messaging: Robust in-only In-optional-out Robust out-only Out-optional-in WSDL Predefined MEPs core additional, not formal standard

  40. WSDL Invocation MEPs • In-only: a single input message • No faults • In-out: a single input message, a single output message • A fault may replace output message • Out-only and Out-in mirror images of the above

  41. WSDL Messaging MEPs • Robust in-only: a single input message • May trigger a fault • In-optional-out: a single input message, possibly an output message • Either message may trigger a fault • Robust out-only, Out-optional-in mirrored

  42. WSDL Binding • Networking details necessary for accessing the service • Copies interface structure • SOAP and HTTP bindings provided

  43. WSDL Bindings • SOAP binding: • XML message in SOAP envelope • Transport using a SOAP protocol binding (HTTP) • HTTP binding: • Web-friendly • XML message in payload, or as parameters in the URI

  44. WSDL Service • A logical node of the application • One interface • Multiple alternate endpoints • Endpoints may have different bindings • E.g. SOAP over HTTP for a public endpoint, and SOAP over JMS for the intranet

  45. WSDL Service Example <service name=“HypoTirol” interface=“Banking”> <endpoint name=“visible” binding=“HTTP” address=“http://ht.at/bankingSvc” /> <endpoint name=“tls” binding=“SecureHTTP” address=“https://ht.at/bankingSvc” /> </service>

  46. WSDL Summary • Concrete service • Abstract and reusable Interface • Network binding • WSDL does not imply implementation • CORBA IDL requires objects • Exchange of XML business documents • Extensible in many ways

  47. And More…

  48. UDDI • Universal Description, Discovery and Integration • A Web service registry API specification • Business-oriented service publication, discovery (initially limited search capabilities) • Itself has Web service interface • Useful for intranet registries • A failed public service

  49. UDDI Structure • Business entity • Organization information, contact • Business Service • A group of related services • Binding Template • Information on how to access the service • tModel (technical model) • Any kind of specification, e.g. WSDL • Also for classification, categorization

  50. WS Policy • Non-functional metadata • Security, Quality of service, Privacy, Transactionality policies • Policy a set of alternatives (OR) • Auth tokens: Kerberos OR X509 • Alternative a set of assertions (AND) • Auth token AND secure channel • Assertions come from 3rd parties

More Related