Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.5, 2.2.1
-
None
Description
The SAAJInInterceptor creates a SAAJ SOAPFault with only one "Detail" child. For example, if a SOAP Fault is received with:
<detail><errorcode>3</errorcode><errorstring>This is a fault detail error string</errorstring></detail>
The following code in SAAJInInterceptor will only add a detail element with a single child element to the SOAPFault object that is created:
soapFault.addDetail().appendChild(
soapMessage.getSOAPPart().importNode(
fault.getDetail().getFirstChild(), true));
And so the output will be:
<detail><errorcode>3</errorcode></detail>
This is clearly a bug, as the SOAP specs allow for multiple detail child elements. Even worse, it doesn't take into account the fact that fault.getDetail() could be of type e.g Node.TEXT, and it could just end up adding a newline character.