SoapFault fault = new SoapFault(SoapFault.RECEIVER, null, null, null, jbiFault.getContent());
SoapMessage soapFault = soapHelper.onFault(ctx, fault);
Map headers = (Map) jbiFault.getProperty(JbiConstants.PROTOCOL_HEADERS);
response = endpoint.getMarshaler().toJMS(soapFault, headers, session);
} else {
NormalizedMessage outMsg = exchange.getMessage("out");
if (outMsg != null) {
SoapMessage out = soapHelper.onReply(ctx, outMsg);
Map headers = (Map) outMsg.getProperty(JbiConstants.PROTOCOL_HEADERS);
response = endpoint.getMarshaler().toJMS(out, headers, session);
}
}
}
return response;