Ariba Supplier OnRamp 7.1 | webMethods Ariba Supplier OnRamp Documentation | webMethods Ariba Supplier OnRamp Installation and User’s Documentation | Development Utilities | Using the Error Utility
 
Using the Error Utility
The wm.b2b.cxml.utils.errors folder of the WmAribaSupplier package provides a set of APIs for reporting errors in Ariba Supplier OnRamp. The core of this package relies on a serviceError structure in the pipeline to detect and process errors. When developing services, make sure that you return a serviceError structure containing an error message if you want to report errors to the Ariba Supplier OnRamp core.
To create a serviceError record, invoke wm.b2b.cxml.utils.errors:setError with the following arguments:
*error. The error message.
*errorStatusCode. Optional. This argument corresponds to the numeric status code in the cXML ErrorResponse returned to Ariba Supplier Network. If not specified, the ErrorResponse statusCode is set to 500. Otherwise, the value you specify here is used. For a description of ErrorResponse status codes, see the cXML User's Guide Version 1.2.