top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-
bindupriya0705

SOAP Web Services & REST Web Services

Web Services can be categorized into two types

  • SOAP Web Services

  • Rest Web Services

SOAP:

  • Full form is Simple Object Access Protocol

  • XML based message protocol

  • It uses WSDL for communication between consumer and providers

  • It supports XML-coded messages over a transport protocol such as HTTP,SMTP.


SOAP Message Structure



Representation of Sample Message:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">

<soapenv:Header/>

<soapenv:Body>

<tem:Add>

<tem:intA>3</tem:intA>

<tem:intB>5</tem:intB>

</tem:Add>

</soapenv:Body>

</soapenv:Envelope>


Envelope:It identifies the XML document as a SOAP message.

Header: The Header section can contain meta data about the message.

Meta data is "data that describes data". A SOAP message does not have to contain a Header.

Header elements make it possible to extend the base SOAP protocol, to accommodate needs that the

SOAP specification does not include.

Body:It is mandatory element, that contains request and response information

Fault: When a message is rejected, the server generates a Fault, or error message.

Faults are commonly caused by unrecognizable header fields, messages that cannot be authenticated, or problems that occurred when the server attempted to invoke a method or process the message.


Note: Header and Fault are optional elements.



REST:

  • Full form is Representational State Transfer

  • It is an Architectural style Protocol

  • It can access using Uniform Resource Identifiers(URIs)

  • It uses XML Or JSON to send and receive data

  • It mainly uses HTTP &HTTPS protocol.

client sends an HTTP request to Webserver, similarly Webserver sends an HTTP response for the same .

For communications it uses various HTTP methods as shown below:








127 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page