My application is using JAX-WS and for Java version 8_121 all is well when a SOAPFault occurs, with the response being generated as follows:
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<Action xmlns="http://www.w3.org/2005/08/addressing" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" S:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</Action>
<MessageID xmlns="http://www.w3.org/2005/08/addressing">A36AE1D2-B060-465D-9C7A-D5F40B2429BF</MessageID>
<RelatesTo xmlns="http://www.w3.org/2005/08/addressing">ABCDE-12345-ABCDE</RelatesTo>
<To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
</S:Header>
<S:Body>
<S:Fault xmlns="" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Client</faultcode>
<faultstring>An error has occurred - please see the detail element for further information</faultstring>
<detail>
<itk:ToolkitErrorInfo xmlns="urn:hl7-org:v3" xmlns:itk="urn:nhs-itk:ns:201005">
<itk:ErrorID>ADF9356D-2191-4D2D-9649-2B4A7EEFA2AF</itk:ErrorID>
<itk:ErrorCode>3000</itk:ErrorCode>
<itk:ErrorText>Unable to process request</itk:ErrorText>
<itk:ErrorDiagnosticText>Client ID forbidden</itk:ErrorDiagnosticText>
</itk:ToolkitErrorInfo>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>
However, when I take the Java version to 8_164, the same application outputs this:
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header xmlns="http://www.w3.org/2005/08/addressing" xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<Action xmlns="http://www.w3.org/2005/08/addressing" S:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</Action>
<MessageID>7A8D2AEE-37E5-4CD1-BFF7-957E59130EA2</MessageID>
<RelatesTo>ABCDE-12345-ABCDE</RelatesTo>
<To>http://www.w3.org/2005/08/addressing/anonymous</To>
</S:Header>
<S:Body xmlns="" xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">
<S:Fault>
<faultcode>S:Client</faultcode>
<faultstring>An error has occurred - please see the detail element for further information</faultstring>
<detail xmlns="urn:hl7-org:v3" xmlns:itk="urn:nhs-itk:ns:201005">
<itk:ToolkitErrorInfo xmlns:itk="urn:nhs-itk:ns:201005">
<itk:ErrorID>A70FE962-B17D-4DFF-A866-BC02AC73AB79</itk:ErrorID>
<itk:ErrorCode>3000</itk:ErrorCode>
<itk:ErrorText>Unable to process request</itk:ErrorText>
<itk:ErrorDiagnosticText>Client ID forbidden</itk:ErrorDiagnosticText>
</itk:ToolkitErrorInfo>
</detail>
</S:Fault>
</S:Body>
</S:Envelope>
JAX-WS appears to have added extra, unneeded namespaces to the 'Detail' element, so that for 8_121 it is
<detail>
But for 8_162 it is
<detail xmlns="urn:hl7-org:v3" xmlns:itk="urn:nhs-itk:ns:201005">
This then prevents the client side JAX-WS code from correctly parsing the SOAPFault, and it loses the detail element.
The implementation does have binding annotatations to set those namespaces, but they are both set for packages that 'detail' is not in. I am unable to determine why they are being added, and at that, only once I go above version 121.
Does anybody have any idea what might be causing this and how I can prevent it happening, or if not that, any tips on how I might further diagnose the cause?
Okay, since there's nothing, I never did figure this out, but my workaround, should you find yourself washing up here with a similar issue was this:
I used a handler in the output handler chain to manually remove the bad namespace declarations.