Web Service Example 2: SOAP request and response messages

Previous Next

This topic provides background information about the SOAP messages that are sent in Web Service Example 2: RPC-Oriented Method with Simple Type Parameters Based on a Domain.

In example 2, the following client SQL statement is executed:

INVOKE TRAVELCOMPONENT.GETSCHEDTOURSBETWEEN

WITH

SELECT sysdate, to_date('01-01-2012','dd-mm-yyyy')

 

The Web Service component handles this statement, and composes a SOAP request message. The information how to compose this RPC-oriented message is defined in the TRAVELSERVICE.wsdl file. Here is the SOAP request message:

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body>    <ns1:GetSchedtoursBetween soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl">    <ns1:start_date xsi:type="xsd:date">2010-10-14</ns1:start_date>

   <ns1:end_date xsi:type="xsd:date">2012-01-01</ns1:end_date>    </ns1:GetSchedtoursBetween></soapenv:Body>

</soapenv:Envelope>

 

The body of this SOAP request message includes a GetSchedtoursBetween method and start_date and end_date input parameters. Note the IO format of these parameter values, e.g. 2010-10-14

Next, the following statement is sent to the Rules Service:

INVOKE

TRAVELSERVICE.GetSchedtoursBetween

WITH

SELECT '... soap message above ...' request

 

Then, the Web Service provider composes a SOAP response:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="http://MyWebServer/TravelService/TRAVELSERVICE.wsdl">

<soap:Body>

   <GetSchedtoursBetweenResponse

   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

       <NumberOfScheduledTours

           xmlns:xsd="http://www.w3.org/2001/XMLSchema"

           xsi:type="xsd:int">19

       </NumberOfScheduledTours>

   </GetSchedtoursBetweenResponse>

</soap:Body>

</soap:Envelope>

 

The body of this SOAP response message includes a GetSchedtoursBetweenResponse method and the NumberOfScheduledTours output parameter.