UNIT -3
SOAP
SOAP Communication Model:
SOAP communication is done via the HTTP protocol. A lot of web services were using standard RPC(Remote Procedure Call) style for communication. This was considered the simplest form but it has a lot of limitations.
For example
Consider that the server hosts a web service which provide two methods
- GetEmployee- Get all Employee details.
- Set Employee – Set the value of details of employee dept, salary etc.
In RPC style communication the client will call the methods in its request and send the required parameters to the server, the server would then send the desired response.
The limitations of the above communications is
- The server hosting the methods would be in a particular programming language and calls to server would be in that programming language only.
- When call is made to remote procedure , the call is not carried out via standard protocol .Because of this issue all communication over the web has to be done by HTTP protocol.
- Since RPC calls do not go through normal protocol separate ports have to be opened on server to allow the client to communicate with the server.
- This gives rise to traffic and a lot of configuration has to be done to establish communication between the server and client.
To overcome such limitations the SOAP uses this model of communication
The client would format the information regarding the procedure call
Arguments into SOAP message and sends to server as part of HTTP request
This process of encapsulating data into SOAP message is known as Marshalling.
The server would then unwrap the message sent by the client
See what the client requested for and then send the appropriate response back to the client as a SOAP message.
The practice of unwrapping a request sent by the client is known as Demarshalling.