* @param messageContext the message context to process
*/
protected void logDecodedMessage(MessageContext messageContext) {
if(protocolMessageLog.isDebugEnabled() && messageContext.getInboundMessage() != null){
if (messageContext.getInboundMessage().getDOM() == null) {
XMLObject message = messageContext.getInboundMessage();
Marshaller marshaller = Configuration.getMarshallerFactory().getMarshaller(message);
if (marshaller != null) {
try {
marshaller.marshall(message);
} catch (MarshallingException e) {
log.error("Unable to marshall message for logging purposes: " + e.getMessage());
}
}
else {
log.error("Unable to marshall message for logging purposes, no marshaller registered for message object: "
+ message.getElementQName());
}
if (message.getDOM() == null) {
return;
}
}
protocolMessageLog.debug("\n" + XMLHelper.prettyPrintXML(messageContext.getInboundMessage().getDOM()));
}