Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request.

Similar presentations


Presentation on theme: "1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request."— Presentation transcript:

1 1 Core Web Services Standards

2 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request Service Location FIND Web Service Client

3 3 SOAP (Simple Object Access Protocol)

4 4 SOAP ● Simple Object Access Protocol ● Wire protocol similar to  IIOP for CORBA  JRMP for RMI ● XML is used for data encoding  “text” based protocol vs. “binary” protocol ● Supports XML-based RPC

5 5 What SOAP is Not ● Not a component model  So it will not replace objects and components, i.e. EJB, JavaBeans ● Not a programming language  So it will not replace Java ● Not a solution for all  So it will not replace other distributed computing technologies such as RMI

6 6 What does SOAP Define? ● Message Envelope ● Encoding Rules ● RPC Convention ● Binding with underlying protocols

7 7 SOAP Message Format SOAP Envelope SOAP Header SOAP Message Primary MIME part (text/xml) Attachment SOAP Body Header Entry Body Entry Attachment

8 8 SOAP Message Envelope ● Encoding information ● Header  Optional  Could contain context knowledge ● Security ● Transaction ● Body  RPC methods and parameters  Contains application data

9 9 SOAP Encoding Rules of expressing application-defined data types in XML Based on W3C XML Schema Simple values – Built-in types from XML Schema, Part 2 (simple types, enumerations, arrays of bytes) Compound values – Structs, arrays, complex types

10 10 SOAP RPC Request Example SUNW

11 11 SOAP RPC Response Example 30.5

12 12 SOAP RPC ● Information needed for a method call:  The URI of the target object <m:GetLastTradePrice xmlns:m=“http://stocks.com/StockQuotes"> SUNW

13 13 SOAP RPC ● Information needed for a method call:  The URI of the target object  Method name <m:GetLastTradePrice xmlns:m=“http://stocks.com/StockQuotes"> SUNW

14 14 SOAP RPC ● Information needed for a method call:  The URI of the target object  Method name  Parameters <m:GetLastTradePrice xmlns:m=“http://stocks.com/StockQuotes"> SUNW

15 15 Quick WSDL Tutorial

16 16 What is WSDL? XML language for describing web services Web service is described as – A set of communication endpoints (ports) Endpoint is made of two parts – Abstract definitions of operations and messages – Concrete binding to networking protocol (and corresponding endpoint address) and message format Why this separation? – Enhance reusability (as we will see in UDDI reference to WSDL document)

17 17 Why WSDL? Enables automation of communication details between communicating partners – Machines can read WSDL – Machines can invoke a service defined in WSDL Discoverable through registry Arbitration – 3rd party can verify if communication conforms to WSDL

18 18 WSDL Document Example ● Simple service providing stock quotes ● A single operation called GetLastTradePrice ● Deployed using SOAP 1.1 over HTTP ● Request takes a ticker symbol of type string ● Response returns price as a float

19 19 ● Types ● Message ● Operation ● Port Type ● Binding ● Port ● Service WSDL Elements

20 20 WSDL Elements ● Types  Data type definitions  Used to describe exchanged messages  Uses W3C XML Schema as canonical type system

21 21 WSDL Example: Types <definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:tns="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/”> <schema targetNamespace="http://example.com/stockquote.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema">

22 22 WSDL Elements ● Messages  Abstract, typed definitions of data being exchanged ● Operations  Abstract description of an action  Refers to an input and/or output messages ● Port type  Collection of operations  Abstract definition of a service

23 23 Example: Messages, Operation, Port type

24 24 WSDL Elements ● Binding  Concrete protocol and data format for a particular Port type  Protocol example: SOAP 1.1 over HTTP or SOAP 1.1 over SMTP ● Port  Defines a single communication endpoint  Endpoint address for binding  URL for HTTP, email address for SMTP ● Service  Aggregate set of related ports

25 25 Example: Binding, Port, Service <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <soap:operation soapAction="http://example.com/GetLastTradePrice"/> My first service

26 26 UDDI

27 27 Service Architecture UDDI defines a way to publish and find information about Web services. UDDI Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request Service Location FIND Web Service Client

28 28 UDDI (Universal Description, Discovery and Integration) ● “ White pages” – address, contact, and known identifiers ● “ Yellow pages” – industrial categorizations ● Industry: NAICS (Industry codes - US Govt.) ● Product/Services: UN/SPSC (ECMA) ● Location: Geographical taxonomy ● “Green pages” – technical information about services

29 29 Other Web Services Standards

30 30 ebXML A global electronic market place where enterprises of any size, anywhere can: – Find each other electronically – Conduct business through exchange of XML based business messages

31 31 More Web Services Standards ● Security  XML Signature, XML Encryption, XKMS, XACML, SAML, Liberty, WS-Security ● Transaction  BTP, WS-Transaction ● Business collaboration and choreography  ebXML BPSS, ebXML CPP/CPA, BPML, WSFL, XLANG, WSCI, BPEL4WS

32 32 More Web Services Standards ● Business Language  UBL (Universal Business Language) ● Component model  WSIA (Web Services for Interactive Application) ● Portal  WSRP (Web Services for Remote Portals)

33 33 What Is a Web Service? ● A set of endpoints (ports) operating on messages ● Ports are operating within a container  Container provides runtime environment  Contract for runtime environment are specified in JAX-RPC, EJB 2.1, JSR 109 ● Service is described in WSDL document and published to a registry  WSDL specifies a contract between service provider and client

34 34 Web Service Component and Container ● Container vs. Component model  Web services components get executed within a container  Components are portable (under J2EE 1.4) ● Web service components  Web-tier (Servlet-based endpoint)  EJB-tier (Stateless session bean-based endpoint)

35 35 Web Service Components Source: Web Services for J2EE (JSR 109), V1.0 Web services components

36 36 Summary

37 37 Summary ● Web services provides a new paradigm for program to program communication ● Comprehensive set of Java APIs for Web Services are now available! ● J2EE is the platform of choice for Web services


Download ppt "1 Core Web Services Standards. 2 (Simplified) Web Service Architecture Registry 1. Service Registers PUBLISH 3. Client calls Service BIND 2. Client Request."

Similar presentations


Ads by Google