uCosminexus Service Platform, Basic Development Guide
If an error occurs at the request-destination service component, the HCSC server, or the SOAP engine, acquire the error information and take corrective action according to the information. For details about how to send an error, see the contents about troubleshooting during the execution of a Web Service (SOAP communication), in the manual Cosminexus Service Platform System Setup and Operation Guide.
The error acquisition method differs depending on the type of SOAP Communication Infrastructure.
When the SOAP Communication Infrastructure provided by Cosminexus is used, catch the CSCMsgServerFaultException object and acquire the SOAP Fault error information.
To acquire the error information, the following must be installed on the service requester side:
... } catch (CSCMsgServerFaultException e) { System.err.println("Exception ErrorMessage = " + e.getErrorMessage() ); System.err.println("Exception ErrorCode = " + e.getErrorCode() ); System.err.println("Exception ProcessInstanceID = " + e.getProcessInstanceID() ); System.err.println("Exception FaultCode = " + e.getCscmsgFaultCode() ); System.err.println("Exception FaultString = " + e.getCscmsgFaultString() ); System.err.println("Exception FaultActor = " + e.getCscmsgFaultActor() ); System.err.println("Exception FaultDetails = " + new String(e.getCscmsgFaultDetail(), "UTF-8")); System.err.println("Exception FaultName = " + e.getFaultName() ); } ... |
Each method is explained below.
The error information to be acquired depends on the SOAP engine installed on the service requester side.
The following table shows the error information (SOAPFault) format.
Table 8-4 Error information (SOAPFault) format
Element | Name | Content |
---|---|---|
faultcode | Fault code | Value that depends on the SOAP engine. QCName that is referenced by the message type attribute of the message part. |
faultstring | Fault string | Value that depends on the SOAP engine. Outputs KDCCP0015-E. |
faultactor | Fault generator | Value that depends on the SOAP engine. There is no value. |
detail# | Fault detail | Detail that corresponds to wsdl:fault. |
Table 8-5 Error information (SOAPFault) detail
Field name | Explanation | |
---|---|---|
Error (fault) from a service component, a business process, a custom adapter or for integration with HCSC server | Error (exception) detected by the HCSC server | |
errorMessage | Contents of the following errors:
|
|
errorCode | Error code corresponding to the following exceptions:
|
|
processInstanceID | Instance ID information of a business process A value is set when an error occurs in the business process. |
|
cscmsgFaultCode | FaultCode information from a service component (Web Services), business process, or custom adapter | -- |
cscmsgFaultString | FaultString information from a service component (Web Services), business process, or custom adapter | -- |
cscmsgFaultActor | FaultActor information from a service component (Web Services), business process, or custom adapter | -- |
cscmsgFaultDetail | Detail information from a service component (Web Services), business process, or custom adapter | -- |
faultName | Fault name (exception name) information from a service component (Web Services or SessionBean) or business process A value is set in the following cases:
|
-- |
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.