On Thursday 21 October 2010 12:11:29 pm jaybytez wrote: > Just a quick question or two about SOAPFaults in CXF: > > 1) How are exceptions handled from CXF for service endpoints? Are these > automatically converted into SOAPFaults
Yes. All exceptions are converted to SOAPFaults. > and does it depend on Runtime or Checked? Not really. Checked exceptions (with one exception) are converted to faults in the generated WSDL. Subclasses of RemoteException are ignored for this, per JAX-WS spec. > And are the annotations required to establish an exception as a > SOAPFault? No. However, the annotations can be used to customize various things in the fault with how it appears in the wsdl and on the wire. > 2) On the CXF Client side, are the SOAPFaults converted back to > Runtime/Checked exceptions? How does CXF client handle SOAPFaults? In the case of wsdl2java generated clients where the fault can be mapped to generated exceptions, they would be thrown. If it's not mappable, a generic WebServiceException (or its subclasses) would be thrown wrappering a generic SOAPFault class. Dan > > Guess it was more than one question, but thanks for the help! > > Jay -- Daniel Kulp [email protected] http://dankulp.com/blog
