Rules Service SOAP error messages

Previous Next

When connecting to the Rules Service via HTTP, and when using the soap ResponseTypeHint, error 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>

...

        <Input>

            <Param name = "Application"> ... </Param>

            <Param name = "User"> ... </Param>

            <Param name = "ContentType"> ... </Param>

            <Param name = "Method"> ... </Param>

            <Param name = "Password"> ... </Param>

            <Param name = "SQL"> ... </Param>

            <Param name = "SpecificParameter"> ...</Param>

            ...

        </Input>

        <soap:Fault>

            <faultcode> ... </faultcode>

            <faultstring> ... </faultstring>

            <detail> ... </detail>

        </soap:Fault>

    </soap:Body>

</soap:Envelope>

 

The <Input> element contains all input parameters.

The <faultcode> element currently contains value: "Server", a standard SOAP 1.1 fault code. The <faultstring> element contains the error message, meant for the user. Currently, the <detail> element is identical to the <faultstring> element.

Example

Suppose, this HTTP call is executed:

http://travelserver:4711/TRAVEL/TRAVELUSER/'text/xml-SOAP' /SqlScript?$Password="TrustMe"&$SQL=" insert into EMPLOYEE(ID,NAME) values (1, 'FRANK')"

 

and it turns out that a record with ID 1 already exists. This is the SOAP error message, returned by the Rules Service:

<?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>

    <Input>

      <Param name = "Application">TRAVEL</Param>

      <Param name = "User">TRAVELUSER</Param>

      <Param name = "ContentType">text/xml-SOAP</Param>

      <Param name = "Method">SqlScript</Param>

      <Param name = "Password">Trustme</Param>

      <Param name = "SQL"> insert into EMPLOYEE(ID,NAME) values (1, 'FRANK')</Param>

    </Input>

  ...

    <soap:Fault>

      <faultcode>soap:Server</faultcode>

      <faultstring>

        Key "(id)" is not unique. Script: INSERT in table "EMPLOYEE" not

        accepted for record 0 :

        (1, (null), (null), 'AA', (null), (null))

      </faultstring>

      <detail>

        <ErrorMessage Type = "Error" Source = "Rules Engine">

          Key "(id)" is not unique. Script: INSERT in table "EMPLOYEE" not

          accepted for record 0 :

          (1, (null), (null), 'AA', (null), (null))

        <ErrorMessage>

      </detail>

    </soap:Fault>

  </soap:Body>

</soap:Envelope>