The Structure of SOAP
We will first examine a simple example of SOAP being used with HTTP. This example transmits a GetCurrentTemperature SOAP request to a CurrentTemperature service (see Listing 13.2). The request takes a string parameter, city code, which represents the city for which you wish to retrieve the temperature. The SOAP server that receives this request will return a floating point number that corresponds to the current temperature in the requested city.
Now we will examine the request and response in greater detail. As you can see from Listing 13.2, the SOAP Envelope element, SOAP-ENV:Envelope is the top element of the XML
document representing the SOAP message. XML namespaces, short names that prefix tag names, are used to ensure that SOAP identifiers are not confused with application specific identifiers. For example, the tag <SOAP-ENV:Envelope> is using a namespace of SOAP-ENV.
Post a comment