Previous page

Next page

Locate page in Contents

Print this page

Error Handling

When an error occurs during the request processing, the error information is returned to the client as an XML message. A single response message may contain multiple errors if the original request contained more than one request. A single request may also produce more than one error message. The error information is included in the message body and may be placed at the various levels of the message body hierarchy depending on the original location of the request or the element that caused the error. The format of the XML structure containing the error information is as follows:

<data>

  <operator_name>

    <error>

      <code>error_code</code>

      <message>error_message</message>

    </error>

  </operator_name>

</data>

The element that we described as operator_name in the example above will actually have the same name as the Agent operator that generated the response. The error information consists of a numeric code and a string describing the problem. Agent has its own list of errors. The errors reported by various system utilities and the internal calls invoked by Agent operators are automatically translated to their client-level Agent equivalents. This means that regardless of the computing platform, the error codes and descriptions will always be consistent.

The following is an example of an error message produced by the login call of the sessionm interface.

Input:

<packet version="4.0.0" id="2">

  <target>sessionm</target>

  <data>

    <sessionm>

      <login>

        <name>cm9vdA==</name>

        <realm>00000000-0000-0000-0000-000000000000</realm>

        <password>bXlwYXNz</password>

      </login>

    </sessionm>

  </data>

</packet>

Output:

<?xml version="1.0" encoding="UTF-8"?><packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/sessionm" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="8c46e129f3t18ber330" time="2007-09-07T05:04:50+0000" priority="0" version="4.0.0">

<origin>sessionm</origin>

<target>vzclient67-4fce28dd-0cd3-1345-bb94-3192b940fb90</target>

<dst>

  <director>gend</director>

</dst>

<data>

  <sessionm>

    <error>

      <code>400</code>

      <message>Invalid packet: invalid password.</message>

    </error>

  </sessionm>

</data>

<src>

  <director>gend</director>

</src>

</packet>

Please send us your feedback on this help page