Webservice intro

Preview:

Citation preview

Web ServicesPresented by

Ammar M. Zerouk

ammarzerouk@gmail.com - @kaptainzero

•Models

••SOAP

•WSDL

•UDDI

•functionURIHTTP

API

•WWWalways-onUtility Computing

•RPCORPC(DCOM, COBRA, and JAVA RMI)

••Interoperability

•Firewall Traversal

•Complexity

Interoperability

Firewall Traversal

•COBRADCOM

•HTTP80

Complexity

•developer-friendly

•HTTPCOM, RMI, COBRA

••API

•SOAPWSDLUDDIXML

•RESTfulAPISOAP

FacebookYahooIMDB

••Service Provider

•Service Requestor•

•Service Registry•

••Publish

•Find•

•Bind•

SOAP: Simple Object Access Protocol

•SOAP•

•Platform Independent

•Language Independent

•XML

•Extensible

•W3C

SOAP: Simple Object Access Protocol

• SOAP 1.0: Microsoft, Userland, DevelopMentor.• Specific to COM and HTTP.

• SOAP 1.1: include contributions from IBM and Lotus.• Substitutable transport binding (not just HTTP).

• Substitutable language binding (e.g. java).

• Substitutable data encoding (not only ANSI).

• Completely vendor-neutral (by W3C).

• Independent of: programming language, object model, operating system, or platform.

• SOAP 1.2: w3.org “XML Protocol” working group.

SOAP

•Request and Response Messages•remote object

•SOAPenvelop•

•namespace

SOAP

• <?xml version="1.0"?>

• <soap:Envelope

• xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

• soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

• <soap:Body xmlns:m="http://www.stock.org/stock">

• </soap:Body>

• </soap:Envelope>

SOAP

<m:GetStockPrice>

<m:StockName>IBM</m:StockName>

</m:GetStockPrice>

Message

NamespaceSOAP Envelope

SOAP Envelope

Namespace

Message

SOAP

• <?xml version="1.0"?>

• <soap:Envelope

• xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

• soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

• <soap:Body xmlns:m="http://www.stock.org/stock">

• </soap:Body>

• </soap:Envelope>

<m:GetStockPriceResponse>

<m:Price>34.5</m:Price>

</m:GetStockPriceResponse> Message

SOAP EnvelopeResult

returned in

Body

SOAP

••Unix RPC–

•COBRA–ORB

•RMI–java

•DCOM–Windows

•SOAP

•XML

SOAP

•RPC (Remote Procedure Call)•

•SOAP•XML

••

WSDL: Web Service Description Language

•WSDL•XML

•XML

••

•implementationservice interface

WSDL

•<portType>•

•<message>•

•<types>•

•XML Schema

•<binding>•

WSDL

• <message name="getTermRequest">

• <part name="term" type="xs:string"/>

• </message>

• <message name="getTermResponse">

• <part name="value" type="xs:string"/>

• </message>

• <portType name="glossaryTerms">

• <operation name="getTerm">

• <input message="getTermRequest"/>

• <output message="getTermResponse"/>

• </operation>

• </portType>

<message name="getTermRequest">

<part name="term" type="xs:string"/>

</message>

<message name="getTermResponse">

<part name="value" type="xs:string"/>

</message>

<portType name="glossaryTerms">

<operation name="getTerm">

<input message="getTermRequest"/>

<output message="getTermResponse"/>

</operation>

</portType>

<binding type="glossaryTerms" name="b1">

<soap:binding style="document"

transport="http://schemas.xmlsoap.org/soap/http" />

<operation>

<soap:operation

soapAction="http://example.com/getTerm"/>

<input>

<soap:body use="literal"/>

</input>

<output>

<soap:body use="literal"/>

</output>

</operation>

</binding>

Binding to SOAP

UDDI: Universal Description, Discovery, and Integration

•UDDI•Directory Service

•WSDL

•UDDISOAP

•UDDI•W3CXML, HTTP, DNS

•WSDL

UDDI

•Service Registry•

•Service Provider•

•Service Requestor•Service Broker

UDDI

UDDI

•business

•business

NodesUDDI

•Internal Enterprise ApplicationUDDI•

•Firewall

•PortalUDDI•

NodesUDDI

•Partner CatalogUDDI•

•E-MarketplaceUDDI•

•RPCCOBRA

•e-Business•Security

•Transaction Management

•QOS