Message odeResponse = mex.createMessage(mex.getOperation().getOutput().getMessage().getQName());
if(soapResponseMessage.getSOAPBody().hasFault())
{
// fault handling
Document odeMsg = DOMUtils.newDocument();
Element odeMsgEl = odeMsg.createElementNS(null, "message");
odeMsg.appendChild(odeMsgEl);
Fault fault = messageAdapter.parseSoapFault(odeMsgEl, soapResponseMessage, mex.getOperation());
handleFault(mex, fault, soapResponseMessage.getSOAPBody().getFault(), odeMsgEl);
}
else
{
messageAdapter.parseSoapResponse(new ODEMessageAdapter(odeResponse),
soapResponseMessage,mex.getOperation());
mex.reply(odeResponse);
}
if(log.isDebugEnabled())
log.debug( "ODE inbound message: \n" +DOMWriter.printNode(odeResponse.getMessage(), true) );
} catch(javax.xml.ws.soap.SOAPFaultException fe) {
// fault handling
Document odeMsg = DOMUtils.newDocument();
Element odeMsgEl = odeMsg.createElementNS(null, "message");
odeMsg.appendChild(odeMsgEl);
if (log.isDebugEnabled()) {
log.debug("Riftsaw soap fault: \n" + DOMWriter.printNode(fe.getFault(), true));
}