You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by wsdev2012 <p....@gmail.com> on 2012/04/17 03:16:57 UTC
Soap12FaultOutInterceptor output
Hi,
as for specs http://www.w3.org/TR/soap12-part1/#soapfault if a Fault occurs
inside the interceptor chain
the response should be something like:
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
>
<S:Body>
<S:Fault>
<S:Code>
<S:Value>S:Sender</S:Value>
<S:Subcode>
<S:Value>wsse:InvalidSecurityToken</S:Value>
</S:Subcode>
</S:Code>
<S:Reason>
<S:Text xml:lang="en-US">An invalid security token was provided</S:Text>
</S:Reason>
<S:Detail>
</S:Detail>
</S:Fault>
</S:Body>
</S:Envelope>
instead i get this:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<soap:Fault>
<soap:Code>
<soap:Value>soap:Receiver</soap:Value>
</soap:Code>
<soap:Reason>
<soap:Text xml:lang="en">An invalid security token was
provided</soap:Text>
</soap:Reason>
</soap:Fault>
</soap:Body>
java code to generate Fault:
SoapFault fault = new SoapFault("An invalid security token was provided",
Soap12.getInstance().getSender());
fault = SoapFault.createFault(fault, Soap12.getInstance());
fault.setSubCode(WSConstants.INVALID_SECURITY_TOKEN);
message.setContent(Exception.class, fault);
throw fault;
webservice endpoint is Soap12, CXF v2.5.2.
debugging the code i see Soap12FaultOutInterceptorInternal being called ,
line 69 has SoapFault fault = SoapFault.createFault(f,
message.getVersion());
which clone the fault (f) but looses the subcode.
at line 94 Soap12FaultOutInterceptorInternal we have
if (fault.getSubCode() != null) {
and is always null and never output his value because it is lost in cloning.
am i doing something wrong?
is it a bug or a regression?
(https://issues.apache.org/jira/browse/CXF-4181)
thank you
regards,
Paolo
--
View this message in context: http://cxf.547215.n5.nabble.com/Soap12FaultOutInterceptor-output-tp5645311p5645311.html
Sent from the cxf-user mailing list archive at Nabble.com.