What is SOAP?
SOAP is an XML-based messaging protocol. It defines a set of rules for structuring messages that can be used for simple one-way messaging but is particularly useful for performing RPC-style (Remote Procedure Call) request-response dialogues. It is not tied to any particular transport protocol though HTTP is popular. Nor is it tied to any particular operating system or programming language so theoretically the clients and servers in these dialogues can be running on any platform and written in any language as long as they can formulate and understand SOAP messages. As such it is an important building block for developing distributed applications that exploit functionality published as services over an intranet or the internet.
Let’s look at an example. Imagine you have a very simple corporate database that holds a table specifying employee reference number, name and telephone number. You want to offer a service that enables other systems in your company to do a lookup on this data. The service should return a name and telephone number (a two element array of strings) for a given employee reference number (an integer). Here is a Java-style prototype for the service:
String[] getEmployeeDetails ( int employeeNumber );


