Customized XML Error Messages

Previous Next

See Also

A WSDL schema can describe the structure of web service error messages. These messages can also be in XML format.

For each web service provider method, you can customize the error handling by clicking the Advanced button in the Web Services (Provider) window, and then selecting the Use Custom XML Error Messages checkbox.

The default error message structure for customized XML error messages is:

<ErrorResponse xmlns=" http://www.usoft.com/Solutions/USoft/Product/Messages">

<Code>code </Code>

<Message>message</Message>

</ErrorResponse>

The default XSL transformation (userror_wsp.xsl) transforms the error xml into this format. For example, if the error is caused by a constraint, then the error code is the constraint name and the error message is the constraint message. A unique code is assigned also for errors from:

· Mandatory columns – USMANCOL

 

· Relationships – USREL

 

· Min Max value for a domain - USDOMMIN and USDOMMAX

 

· Allowed values for a domain – USDOMALLOWED

 

· Column width – USCOLWIDTH

 

· Uppercase – USCOLUPPER

 

· Unique key - USUNIQUEKEY

All other errors have a generic USOFT999 error code.

You can change the default XSL transformation:

<usoft installation>\xsl\ErrorHandling\userror_wsp.xsl

You can also change the element definition for the error message in the underlying XML schema:

<usoft installation>\xsl\ErrorHandling\userror_wsp.xsd