public static java.lang.String | buildManagementMessage(java.lang.String messageType, java.lang.String taskName, java.lang.String taskResult, java.lang.String locToken, java.lang.String locParam, java.lang.String locMessage, java.lang.Throwable expObj)Helper method to build a management message for soap binding component.
String componentName = JavaEEServiceEngineContext.getInstance()
.getJBIContext()
.getComponentName();
ComponentMessageHolder messageHolder =
new ComponentMessageHolder(messageType);
messageHolder.setComponentName(componentName);
messageHolder.setTaskName(taskName);
messageHolder.setTaskResult(taskResult);
if (locToken != null) {
messageHolder.setLocToken(1, locToken);
}
if (locParam != null) {
String[] locParams = new String[1];
locParams[0] = locParam;
messageHolder.setLocParam(1, locParams);
}
if (locMessage != null) {
messageHolder.setLocMessage(1, locMessage);
}
if (expObj != null) {
messageHolder.setExceptionObject(expObj);
}
String retMsg = null;
try {
ManagementMessageBuilder managementMessageBuilder =
new ManagementMessageBuilder();
retMsg =
managementMessageBuilder.buildComponentMessage(messageHolder);
}
catch (Exception exp) {
retMsg = null;
}
return retMsg;
|