Try upgrading to CXF 2.4.1.   This was a bug:

https://issues.apache.org/jira/browse/CXF-3459

that was recently fixed.

Dan


On Thursday, June 16, 2011 11:43:05 AM Daryl Handley wrote:
> I am using CXF to generate a jaxb binded client that is talking to a
> service written in axis2. When I get a SOAP exception I need to get the
> value of the Subcode to determine what type of fault occurred, but I
> can't seem to figure out how to get the info from the jaxb objects.
> 
> Here is the xml returned from the service. I need to get the "3001" code
> out of the jaxb object.
> 
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
> <soapenv:Body>
> <soapenv:Fault xmlns:axis2ns17="http://www.w3.org/2003/05/soap-envelope";>
> <soapenv:Code>
> <soapenv:Value>axis2ns17:Sender</soapenv:Value>
> <soapenv:Subcode>
> <soapenv:Value
> xmlns:axis2ns18="http://www.mywebservice.com/games/";>axis2ns18:3001
> </soapenv:Value>
> </soapenv:Subcode>
> </soapenv:Code>
> <soapenv:Reason>
> <soapenv:Text xml:lang="en-US">User not active.</soapenv:Text>
> </soapenv:Reason>
> <soapenv:Detail/>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
> 
> My code looks like this
> 
> SOAPFault fault = soapException.getFault();
> 
> and from there I have tried
> 
> fault.getFaultCode() => "axis2ns17:Sender"
> fault.getFaultSubCodes() => empty iterator
> 
> and a host of other things. I have also inspected the object from my
> debugger and can't seem to find anything. How do I get this SubCode out
> ? Am I going to have to switch to an Axis2 client ? Will an alternate
> binding help? Any other ideas?
> 
> I am using cxf2.2.4.
> 
> 
> Daryl
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to