Web Services Overview
Web Services Overview
Services
A. Shahrizal
Agenda
Motivation
History
Web service model
Web service components
A walkthrough examples
Motivation
History
Interoperability
Firewall traversal
Complexity
Interoperability
Firewall traversal
Complexity
Service provider
Service registry
Service requestor
Publish operations
Find operation
Bind operations.
1. publish
Web Service
Provider
2. find
3. bind/invoke
Web Service
Client
XML
XML vs HTML
An HTML example:
<html>
<body>
<h2>John Doe</h2>
<p>2 Backroads Lane<br>
New York<br>
045935435<br>
[email protected]<br>
</p>
</body>
</html>
XML vs HTML
XML vs HTML
<?xml version=1.0?>
<contact>
<name>John Doe</name>
<address>2 Backroads Lane</address>
<country>New York</country>
<phone>045935435</phone>
<email>[email protected]</email>
</contact>
In this case:
SOAP
SOAP Characteristics
SOAP Request
POST /InStock HTTP/1.1
Host: www.stock.org
Content-Type: application/soap+xml; charset=utf-8 Content-Length: 150
<?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">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
SOAP Response
HTTP/1.1 200 OK
Content-Type: application/soap; charset=utf-8
Content-Length: 126
<?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">
<m:GetStockPriceResponse>
<m:Price>34.5</m:Price>
</m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>
SOAP Security
WSDL
WSDL Document
<message name="GetStockPriceRequest">
<part name="stock" type="xs:string"/>
</message>
<message name="GetStockPriceResponse">
<part name="value" type="xs:string"/>
</message>
<portType name=StocksRates">
<operation name=GetStockPrice">
<input message=GetStockPriceRequest"/>
<output message=GetStockPriceResponse"/>
</operation>
</portType>
UDDI
Resources
http://msdn.microsoft.com/webservices/unders
tanding/webservicebasics/default.aspx
http://www.w3schools.com/
http://uddi.microsoft.com/Default.aspx
http://www.developer.com/services/article.ph
p/2195981
Many more on the web
Examples
2.
3.