Communication by the SOAP protocol
SOAP (originally
Simple Object Access Protocol) is a protocol for exchanging messages based on
XML over a network, mainly using
HTTP.
The
SOAP format represents the base layer of communication between web services and provides an environment for creating more complex communication.
There are several different kinds of templates for
SOAP communication. The best known of these is the
RPC template, where one of the participants in the communication is the client and the other is the server. The server immediately responds to the client's requests.
The
XML format was chosen as the standard for the transmission of
SOAP messages. This format was chosen because of its widespread use and the availability of development tools offered as opensource or freeware.
An example of what a message from a client might look like:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getProductDetails xmlns="http://warehouse.example.com/ws">
<productID>827635</productID>
</getProductDetails>
</soap:Body>
</soap:Envelope>
An example of a web service response to a client:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<getProductDetailsResponse xmlns="http://warehouse.example.com/ws">
<getProductDetailsResult>
<productName>Chocolate, set of 3 flavours</productName>
<productID>827635</productID>
<description>Chocolate dark, white and cream</description>
<price>98,50</price>
<inStock>yes</inStock>
</getProductDetailsResult>
</getProductDetailsResponse>
</soap:Body>
</soap:Envelope>
In the PROMOTIC system it is possible to communicate by this technology by the
HttpRequest object.