Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1080697
I am currently having a SOAP consumer that has a CAMEL implementation that calls a web service. The returned response from the backend is a SOAP fault. I wish to get the fault details and return a custom/modelled SOAP response back to the caller via a messagecomposer. However, in the CAMEL exchange, the fault details are null.
The SOAPMessageComposer.java is returning a detailNode:
try {
if (soapBody.hasFault()) {
SOAPFault fault = soapBody.getFault();
if (fault.hasDetail()) {
Detail detail = fault.getDetail();
DetailEntry entry = null;
Iterator<DetailEntry> entries = detail.getDetailEntries();
if (entries.hasNext()) {
entry = entries.next();
}
if (entry != null) {
Node detailNode = entry.getParentNode().removeChild(entry);
message.setContent(detailNode);
return message;
}
}
}
|