cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek C. Ashmore" <>
Subject CXF: Proposal to make generated exceptions for Faults more useful
Date Sat, 02 Jan 2016 14:39:38 GMT
Hi -- I tried to create an improvement JIRA for this, but I don't seem 
to have access.  Sorry for the way the proposal is arriving. Thanks for 
looking at this.

This is a proposal for an enhancement to make exceptions generated by 
CXF wsdl2java easier to use. The exceptions that CXF generates for WSDL 
soap faults with web service clients (e.g. input validations, etc) are 
less than helpful. The main reason I say that is that all meaningful 
information somebody would need to solve the issue/ wsdl soap fault 
causing the exception is placed by Cxf in a FaultInfo field not natively 
reported in the exception CXF generates using wsdl2java. To get useful 
information out of a Cxf-generated exception takes custom code. This can 
become a lot of custom code if the service you are consuming defines a 
large number of fault types.

If you like the idea, I'll be happy to migrate it into your code base 
and attach a formal patch. I would need some guidance on which maven 
project this should be included with. I did review proposed enhancements 
and didn't see this.

The proposal is that you provide exceptions for soap faults that include 
this useful field information in the message by default. A sample 
exception log entry for this improved exception contains the useful 
information people need. An example follows:
exception message
Exception Context:
[1:cxfclient.message=embedded cxf info]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

I've open-sourced this project and associated code here, but it really 
belongs as a part of the CXF project somewhere: Note that this solution 
does utilize the Apache Commons Lang library.

More details around the concept used can be found on my blog here:
I'll reiterate that ff you like the idea, I'll be happy to migrate it 
into your code base and attach a formal patch. I'm willing to do the work.
Derek <> 
<> <>
Please note that my email address has changed to

View raw message