[ 
https://issues.apache.org/jira/browse/CXF-7306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Colm O hEigeartaigh closed CXF-7306.
------------------------------------

> Namespace Prefix for Subcode Value is ignored
> ---------------------------------------------
>
>                 Key: CXF-7306
>                 URL: https://issues.apache.org/jira/browse/CXF-7306
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime, Soap Binding
>    Affects Versions: 3.1.10
>            Reporter: Dave Franken
>            Assignee: Daniel Kulp
>             Fix For: 3.1.13, 3.2.0
>
>
> From an InInterceptor, I'm throwing a custom (WS-Security related) SoapFault:
> {code:java}
> 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;
> {code}
> My expectation is that a fault such as this is generated:
> {code:xml}
> <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 
> &lt;wsse:Security> header: No wsse:Security-element found</soap:Text>
>          </soap:Reason>
>       </soap:Fault>
> {code}
> However, a default namespace prefix is chosen:
> {code:xml}
> <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 
> &lt;wsse:Security> header: No wsse:Security-element found</soap:Text>
>          </soap:Reason>
>       </soap:Fault>
> {code}
> The prefix information is lost somewhere.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to