Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1.10
-
None
-
Moderate
Description
From an InInterceptor, I'm throwing a custom (WS-Security related) SoapFault:
SoapFault fault = new SoapFault("An error was discovered processing the <wsse:Security> header: No wsse:Security-element found", SOAPConstants.SOAP_SENDER_FAULT); fault.setSubCode(new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", "InvalidSecurity", "wsse")); throw fault;
My expectation is that a fault such as this is generated:
<soap:Fault> <soap:Code> <soap:Value>soap:Sender</soap:Value> <soap:Subcode> <soap:Value xmlns:*wsse*="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">*wsse*:InvalidSecurity</soap:Value> </soap:Subcode> </soap:Code> <soap:Reason> <soap:Text xml:lang="en">An error was discovered processing the <wsse:Security> header: No wsse:Security-element found</soap:Text> </soap:Reason> </soap:Fault>
However, a default namespace prefix is chosen:
<soap:Fault> <soap:Code> <soap:Value>soap:Sender</soap:Value> <soap:Subcode> <soap:Value xmlns:*ns1*="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">*ns1*:InvalidSecurity</soap:Value> </soap:Subcode> </soap:Code> <soap:Reason> <soap:Text xml:lang="en">An error was discovered processing the <wsse:Security> header: No wsse:Security-element found</soap:Text> </soap:Reason> </soap:Fault>
The prefix information is lost somewhere.