Rules Service SOAP success messages

Previous Next

When connecting to the Rules Service via HTTP, and when using the soap ResponseTypeHint, if the command is executed successfully, messages are returned in this SOAP format:

<?xml version="1.0"?>

<soap:Envelope

  xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

  soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

    <soap:Body>

        <Output ReturnType = "xml|plain">

            ... plain text, xml, or html...

        </Output>

    </soap:Body>

</soap:Envelope>

 

In an HTTP call, you can use the $ReturnType parameter to specify the format of the text in the output element of the success message. The $ReturnType parameter can have values xml or plain. If no parameter is specified the default ReturnType is plain.

To make sure the resulting success message has a valid XML format, use the plain ReturnType. If you are SURE the text in the output element will be in XML format, you can use the XML ReturnType.

Example

Suppose, this HTTP call is executed:

http://travelserver:4711/TRAVEL/TRAVELUSER/xml-SOAP/SqlScript? $Password="TrustMe"&$SQL=" INVOKE xml.export WITH SELECT destination, tour_type FROM TOUR" &$ReturnType="xml"

 

The SOAP success message, returned by the Rules Service, is:

<?xml version="1.0"?>

<soap:Envelope

xmlns:soap="http://www.w3.org/2001/12/soap-envelope"

soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

    <soap:Body>

     <Output ReturnType = "xml">

     <Tours>

        <TOUR DESTINATION="AUSTRALIA" TOUR_TYPE="ISLANDS"/>

        <TOUR DESTINATION="AUSTRALIA" TOUR_TYPE="DOWN THE TRACKS"/>

        <TOUR DESTINATION="BRAZIL" TOUR_TYPE="RAINFOREST RIDE"/>

        <TOUR DESTINATION="EUROPE" TOUR_TYPE="GRAND TOUR"/>

     </Tours>

     </Output>

    </soap:Body>

</soap:Envelope>