On Thu, Aug 5, 2010 at 1:36 PM, S. Ali Tokmen <[email protected]> wrote: > Hello > > On 05/08/2010 13:30, Claus Ibsen wrote: >> >> Just out of ignorance of looking into CXF. But I would assume there >> would be some Exception -> Fault mapping you can leverage. >> Its frankly very common to use exceptions in Java. And if you have a >> wsdl contract with X faults then you may want to map various thrown >> exceptions to appropriate faults. >> >> Just wondering if such feature exists. >> > > That's exactly what the @WebFault annotation does: it is placed on a class > that extends Exception and tells which XML namespace and name this Exception > maps to. > > Hence, it becomes clear what is the XML correspondance for this Java > Exception. >
Well then I think if possible try to implement this as an interceptor (see the org.apache.camel.processor.interceptor.HandleFaultInterceptor Then this feature could be more generic. To turn Exception -> Fault if they have been annotated with @WebFault. btw which .jar is this @WebFault from? I assume its a standard java-ws annotation. > Cheers > > S. Ali Tokmen > [email protected] > > Office: +33 4 76 29 76 19 > GSM: +33 66 43 00 555 > > Bull, Architect of an Open World TM > http://www.bull.com > > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
