SOAP REQUEST AND RESPONSE
The SOAP Envelope Sent for the Request
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cc="http://soaptest.data.work.org/">
<soap:Header/>
<soap:Body>
<cc:validate>
<arg0 number="123456789011" expiry_date="10/12" control_number="544" type="Visa"/>
</cc:validate>
</soap:Body>
</soap:Envelope>
The SOAP Envelope Received for the Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cc="http://soaptest.data.work.org/">
<soap:Body>
<cc:validateResponse>
<return>true</return>
</cc:validateResponse>
</soap:Body>
</soap:Envelope>
About Request and Response
The consumer sends all the credit card information within a SOAP envelope (Listing 14-3) to the validate method of the credit card validator web service. The service returns another SOAP envelope (Listing 14-4) with the result of the validation (true or false).
Envelope
Defines the message and the namespace used in the document. This is a required root element.
Header
Contains any optional attributes of the message or application-specific infrastructure such as security information or network routing
Body
Contains the message being exchanged between applications
Fault
Provides information about errors that occur while the message is processed. This element is optional.
Ref : Beginning of JavaEE 7
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cc="http://soaptest.data.work.org/">
<soap:Header/>
<soap:Body>
<cc:validate>
<arg0 number="123456789011" expiry_date="10/12" control_number="544" type="Visa"/>
</cc:validate>
</soap:Body>
</soap:Envelope>
The SOAP Envelope Received for the Response
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:cc="http://soaptest.data.work.org/">
<soap:Body>
<cc:validateResponse>
<return>true</return>
</cc:validateResponse>
</soap:Body>
</soap:Envelope>
About Request and Response
The consumer sends all the credit card information within a SOAP envelope (Listing 14-3) to the validate method of the credit card validator web service. The service returns another SOAP envelope (Listing 14-4) with the result of the validation (true or false).
Envelope
Defines the message and the namespace used in the document. This is a required root element.
Header
Contains any optional attributes of the message or application-specific infrastructure such as security information or network routing
Body
Contains the message being exchanged between applications
Fault
Provides information about errors that occur while the message is processed. This element is optional.
Ref : Beginning of JavaEE 7