The AS400 PCML connector will provide ERROR_CODEs depending on the error that occurs during its operations. Following are the ERROR_CODEs and their description :
ERROR_CODE | Description |
---|---|
Init Operation | |
100 | Security or authorization error occurred. |
101 | Error occurs when communicating to the AS400 server. |
102 | Unable to disable GUI mode of JTOpen library for authenticating. |
199 | Exception occurred while initializing the AS400 instance. |
Call Operation | |
200 | Unable to connect to AS400 server. |
201 | Error occurred while processing message context. May occur due to invalid data. |
202 | Error occurred while processing the output payload. |
203 | Error occurred while writing data to output payload. |
204 | Error converting XPCML to payload. |
205 | Invalid arguments are passed to the input parameters. |
206 | Program call was not successful. |
299 | Error occurred while calling the AS400 program |
Return Pool Operation | |
300 | Error occurred while processing synapse |
399 | Error occurred while return the AS400 connection to the pool. |
Trace Operation | |
400 | Error occurred when setting logging file path. |
499 | Error occurred when setting trace properties. |
Following is a sample fault handler sequence you can use as a starting point for handling faults when integrating with AS400.
Customize this sample to match your requirements.
Code Block | ||||
---|---|---|---|---|
| ||||
<sequence xmlns="http://ws.apache.org/ns/synapse" name="faultHandlerSeq"> <property xmlns:ns="http://org.apache.synapse/xsd" name="contentTypeValue" expression="get-property('transport', 'Content-Type')"></property> <filter xmlns:ns="http://org.apache.synapse/xsd" xpath="get-property('contentTypeValue') = 'application/json' or get-property('contentTypeValue') = 'text/json'"> <then> <payloadFactory media-type="json"> <format> {"error_code":"$1", "error_message":"$2"} </format> <args> <arg expression="get-property('ERROR_CODE')" evaluator="xml"></arg> <arg expression="get-property('ERROR_MESSAGE')" evaluator="xml"></arg> </args> </payloadFactory> <property name="messageType" value="application/json" scope="axis2"></property> </then> </filter> <filter xmlns:ns="http://org.apache.synapse/xsd" xpath="get-property('contentTypeValue') = 'application/xml' or get-property('contentTypeValue') = 'text/xml'"> <then> <payloadFactory media-type="xml"> <format> <error_info> <error_code>$1</error_code> <error_message>$2</error_message> </error_info> </format> <args> <arg expression="get-property('ERROR_CODE')" evaluator="xml"></arg> <arg expression="get-property('ERROR_MESSAGE')" evaluator="xml"></arg> </args> </payloadFactory> <property name="messageType" value="text/xml" scope="axis2"></property> </then> </filter> <respond></respond> </sequence> |
...
Error Code
This section describes the connector error codes and their meanings.
Init Operation
Error Code | Description |
---|---|
100 | An error occurred in security or authorization. |
101 | An error occurred when communicating with the AS400 server. |
102 | Unable to disable GUI mode of JTOpen library for authenticating. |
103 | An error occurred while retrieving a connection from the pool. |
199 | An exception occurred while initializing the AS400 instance. |
Call Operation
Error Code | Description |
---|---|
200 | Unable to connect to the AS400 server. |
201 | An error occurred while processing message context. May occur due to invalid data. |
202 | An error occurred while processing the output payload. |
203 | An error occurred while writing data to output payload. |
204 | An error converting XPCML to payload. |
205 | Invalid arguments are passed to the input parameters. |
206 | Program call was not successful. |
299 | An error occurred while calling the AS400 program. |
ReturnPool Operation
Error Code | Description |
---|---|
300 | An error occurred while processing synapse. |
399 | An error occurred while returning the AS400 connection to the pool. |
Trace Operation
Error Code | Description |
---|---|
400 | An error occurred while setting the log file path. |
499 | An error occurred while setting trace properties. |