uCosminexus Service Platform, Basic Development Guide
If an error occurs at the request-destination service component, the HCSC server, or the EJB container, acquire the error information and take corrective action according to the information.
You can acquire error information by acquiring the CSCMsgServerException class on the service requester side. For details about the CSCMsgServerException class, see 8.4.7(2) CSCMsgServerException class. For details on how errors are informed, see the contents related to the troubleshooting when SessionBean is executed in the manual Cosminexus Service Platform System Setup and Operation Guide.
To acquire error details, you use the getErrorMessage and getErrorCode methods. To acquire error information (SOAPFault) from Web Services, you use the checkSoapFault method.
A service requester-side installation example for acquiring the CSCMsgServerException class is shown below.
... } catch (CSCMsgServerException e) { System.err.println("Exception ErrorMessage = " + e.getErrorMessage() ); System.err.println("Exception ErrorCode = " + e.getErrorCode() ); if (e.checkFaultMessage() == true) { System.err.println("Exception ProcessInstanceID = " + e.getProcessInstanceID() ); System.err.println("Exception FaultCode = " + e.getFaultCode() ); System.err.println("Exception FaultString = " + e.getFaultString() ); System.err.println("Exception FaultActor = " + e.getFaultActor() ); System.err.println("Exception FaultDetails = " + new String(e.getFaultDetail(), "UTF-8")); System.err.println("Exception FaultName = " + e.getFaultName() ); } } ... |
This is an exception class acquired by the service requester.
jp.co.Hitachi.soft.csc.msg.message.reception
public class CSCMsgServerException extends java.lang.Exception
Field name | Data type | Explanation |
---|---|---|
errorMessage | java.lang.String | Contents of the following exceptions:
|
errorCode | java.lang.String | Error code corresponding to the following exceptions:
|
processInstanceID | java.lang.String | Instance ID information of a business process A value is set when an error occurs in the business process. |
cscmsgFaultCode | java.lang.String | FaultCode information from a service component (Web Services), business process, or custom adapter |
cscmsgFaultString | java.lang.String | FaultString information from a service component (Web Services), business process, or custom adapter |
cscmsgFaultActor | java.lang.String | FaultActor information from a service component (Web Services), business process, or custom adapter |
cscmsgFaultDetail | byte[] | Detail information from a service component (Web Services), business process, or custom adapter |
faultName | java.lang.String | Fault name (exception name) information from a service (Web Services or SessionBean) or business process A value is set in the following cases:
|
Method name | Data type | Explanation |
---|---|---|
getErrorMessage | java.lang.String | Acquires error messages. |
getErrorCode | java.lang.String | Acquires error codes. |
checkFaultMessage | Boolean | Determines whether there is fault information from a service component, business process, or custom adapter. |
getFaultCode | java.lang.String | Acquires FaultCode information. |
getFaultString | java.lang.String | Acquires FaultString information. |
getFaultActor | java.lang.String | Acquires FaultActor information. |
getFaultDetail | byte[] | Acquires Detail information. |
getProcessInstanceID | java.lang.String | Acquires the instance ID of a business process. |
getFaultName | java.lang.String | Acquires a fault name (exception name). |
Class name | Subclass name and explanation | |
---|---|---|
CSCMsgServerException |
|
|
|
||
|
||
|
|
|
|
||
|
||
|
||
|
-- | |
|
-- |
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.