Feedback

  • Contents
 

Body Section

The most important part of a SOAP message is the Body section, since it contains the message's payload. In a request message, the Body defines the method to execute, and parameters that must be passed to it. The Body of a response message contains references to the method called, and return values from the method. If an error occurs, the response contains information about the fault. To better understand these concepts, let's look at some actual request/response messages. The request message in Listing 4 invokes a simple method that adds two numbers. Listing 5 contains the response from the web service.