1 / 26

Web Services

Web Services. What Are Web Services?. Semantically encapsulate discrete functionality Loosely coupled, reusable components Programmatically accessible Distributed over the Internet. A Web Services Technology Stack. *. **. * WSFL has been replaced by BPEL4WS.

ting
Download Presentation

Web Services

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

  2. What Are Web Services? • Semantically encapsulate discrete functionality • Loosely coupled, reusable components • Programmatically accessible • Distributed over the Internet Information Management NTU

  3. A Web Services Technology Stack * ** * WSFL has been replaced by BPEL4WS. ** An alternative is ebXML (a UN/CEFACT standard for EDI-style information exchange). Information Management NTU Source: The Stencil Group

  4. The Core Layers • Common Internet Protocols (HTTP, HTTPS, SMTP, …): the basic communication framework for Web services • XML: a widely accepted format for exchanging data and its corresponding semantics • SOAP: an XML-based protocol for messaging and RPC-style communication between applications (in a distributed environment) Information Management NTU

  5. The Higher-Level Layers • WSDL: an XML-based description of how to connect to a particular Web service • UDDI: a set of protocols and a public directory for registration and real-time lookup of Web services • BPEL4WS: a framework for defining new business processes that utilize existing web services. * ebXML: defines core components, business processes, registry and repository, messaging services, ... Information Management NTU

  6. Implementation Models of Web Services Information Management NTU Source: Sun Microsystems, Inc.

  7. A SOAP Use Case Information Management NTU Source: Sun Microsystems, Inc.

  8. Core Structures of UDDI Information Management NTU Source: Sun Microsystems, Inc.

  9. How WSDL Works Information Management NTU Source: Sun Microsystems, Inc.

  10. How ebXML Works Information Management NTU Source: Sun Microsystems, Inc.

  11. Web Services on .NET Information Management NTU Source: TheServerSide.com

  12. Web Services on J2EE Information Management NTU Source: TheServerSide.com

  13. Processing a Web Service Request Information Management NTU Source: TheServerSide.com

  14. Registering/Discovering a Web Service Information Management NTU Source: TheServerSide.com

  15. Messaging and RPC-Style Requests Information Management NTU Source: TheServerSide.com

  16. The JAX* Suite • JAXR (Java API for XML Registries): to look up the business partner's web service. • JAX/RPC (Java API for XML RPC): to send RPC requests to external web services. • JAXM (Java API for XML Messaging): to send SOAP/ebXML messages to external web service. • JAXP (Java API for XML Parsing) and JAXB (Java API for XML Binding): to transform Java data into an XML format and to convert the received XML data back into a Java language construct, and to perform XSLT transforms to convert schemas. Information Management NTU

  17. Invoking Another Web Service Information Management NTU Source: TheServerSide.com

  18. Simple Object Access Protocol(SOAP) • For information exchange in a distributed environment • Message format based on XML • Can be combined with various transport protocols • Originally developed by Microsoft • SOAP Version 1.2 now a working draft Information Management NTU

  19. Parts of SOAP • The SOAP envelope: for describing what is in a message and how to process it. • The SOAP binding framework (added in Version 1.2): for exchanging SOAP envelopes between peers using an underlying transport protocol • The SOAP encoding rules: for exchanging instances of application-defined data types. • The SOAP RPC representation: a convention for representing remote procedure calls and responses. Information Management NTU

  20. A SOAP Message <env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope"> <env:Header> <n:alertcontrol xmlns:n="http://example.org/alertcontrol"> <n:priority>1</n:priority> <n:expires>2001-06-22T14:00:00-05:00</n:expires> </n:alertcontrol> </env:Header> <env:Body> <m:alert xmlns:m="http://example.org/alert"> <m:msg>Pick up Mary at school at 2pm</m:msg> </m:alert> </env:Body> </env:Envelope> Information Management NTU

  21. Composition of a SOAP Envelope Information Management NTU Source: http://www.w3.org/TR/soap12-part1/

  22. A SOAP Envelope <env: Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope/" env:encodingStyle="http://www.w3.org/2001/09/soap-encoding/"> <env:Header> <t:Transaction xmlns:t="some-URI"> env:mustUnderstand="1" 5 </t:Transaction> </env:Header> <env:Body> <m:GetLastTradePrice xmlns:m="some-URI"> <symbol>DEF</Symbol> </m: GetLastTradePrice> </env:Body> </env : Envelope> Information Management NTU

  23. SOAP Request and Response • Request (partial) <env:Body> <m:GetLastTradePrice xmlns:m="some-URI"> <symbol>DEF</symbol> </m:GetLastTradePrice> </env:Body> • Response (partial) <env:Body> <m:GetLastTradePriceResponse xmlns:m="some-URI"> <price>22.50</price> </m: GetLastTradePriceResponse> </env:Body> Information Management NTU

  24. SOAP Message in an HTTP Request POST /StockQuote HTTP/1.1 Host: www.example.org Content-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "http://example.org/2001/06/quotes" <env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope" > <env:Body> <m:GetLastTradePrice env:encodingStyle="http://www.w3.org/2001/09/soap-encoding" xmlns:m="http://example.org/2001/06/quotes"> <symbol>DIS</symbol> </m:GetLastTradePrice> </env:Body> </env:Envelope> Information Management NTU

  25. SOAP Message in an HTTP Response POST /StockQuote HTTP/1.1 HTTP/1.1 200 OK Content-Type: text/xml; charset="utf-8" Content-Length: nnnn <env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope" > <env:Body> <m:GetLastTradePriceResponse env:encodingStyle="http://www.w3.org/2001/09/soap-encoding" xmlns:m="http://example.org/2001/06/quotes"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </env:Body> </env:Envelope> Information Management NTU

  26. A SOAP Use Case Information Management NTU Source: Sun Microsystems, Inc.

More Related