You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dave Franken (JIRA)" <ji...@apache.org> on 2017/03/31 07:42:41 UTC

[jira] [Updated] (CXF-7306) Namespace Prefix for Subcode Value is ignored

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

Dave Franken updated CXF-7306:
------------------------------
    Component/s: Soap Binding

> 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
>
> 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 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.3.15#6346)