Introduction To Web Services: Praveen Singh Pokharia
Introduction To Web Services: Praveen Singh Pokharia
A web service is a piece of business logic, located somewhere on the Internet, that is accessible through standard-based Internet protocols such as HTTP or SMTP. Using a web service could be as simple as logging into a site or as complex as facilitating a multi-organization business negotiation. Ex: Creating a Sales Order and initiating a workflow.
PUBLISH, UDDI
BIND, SOAP/WSDL
Providers
Components of SOA
Participants:
Provider Registry
(broker) Requestor
Interactions:
Publishing Direct HTTP GET request Dynamic discovery Service Binding
location (finding)
Here is my service !
Find it here !
SOA: Binding
Registry
Here is how !
Provider
40 C
SOAP
SOAP stands for Simple Object Access Protocol. It is based on XML. It is a wired protocol and was defined to be highly interoperable. As of today there are extensive libraries support in virtually all languages to support SOAP based communication.
SOAP: Layers
SOAP-ENV:Envelope
SOAP-ENV:Header
SOAP-ENV:Body
SOAP: Example
POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: 299
</soap:Header>
<soap:Body> <m:GetStockPrice xmlns:m="http://www.example.org/stock"> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
</soap:Header>
<soap:Body> <student> <roll>120</roll> <firstName>Kiran</firstName> <lastName>Reddy</lastName> <grades> <english>A</english> <maths>B</maths>
</grades>
</student> </soap:Body>
SOAP: Envelop
The SOAP envelope declaration is simply the outermost XML tag that delineates the boundaries of the SOAP document. The following envelope tag shows three required attributes, which specify the namespace and the schema to be used for this envelope:
SOAP: Fault
SOAP errors are handled using a specialized envelope known as a Fault Envelope. If an error occurs while the server processes a SOAP message, it constructs a SOAP Fault and sends it back to the client.
RESTful Architecture
HTTP: Introduction
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed, collaborative, hypermedia information systems. HTTP has been in use by the World-Wide Web global information initiative since 1990.
The server responds with a status line, including the message's protocol version and a success or error code, followed by a MIME-like message containing server information, entity meta information, and possible entity-body content.
HTTP: Request/Response
Client Request GET /vnav/labs/PHP/HTTP.php HTTP/1.1 Host: loadaveragezero.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.14) Gecko/20110218 Firefox/3.6.14 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 ...
What is REST?
REST stands for Representational State Transfer. Its basically a stateless communication protocol relying on lightweight protocols like HTTP. It is basically an architectural design methodology.
Thank You!
Q&A