//-----------------------------------------------------------------------
// Create and initialize the OMOutputFormat for Message Externalization
//-----------------------------------------------------------------------
OMOutputFormat outputFormat= new OMOutputFormat();
outputFormat.setSOAP11(isSOAP11);
boolean persistOptimized = getPersistOptimized();
if (persistOptimized) {
outputFormat.setDoOptimize(true);
}
String charSetEnc = (String) getProperty(MessageContext.CHARACTER_SET_ENCODING);
if (charSetEnc == null) {
OperationContext opContext = getOperationContext();
if (opContext != null) {
charSetEnc =
(String) opContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
}
}
if (charSetEnc == null) {
charSetEnc = MessageContext.DEFAULT_CHAR_SET_ENCODING;
}
outputFormat.setCharSetEncoding(charSetEnc);
// ----------------------------------------------------------
// Externalize the Message
// ----------------------------------------------------------
MessageExternalizeUtils.writeExternal(out, this, logCorrelationIDString, outputFormat);