geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: Apache CXF web service and returning Fault
Date Thu, 06 Sep 2007 13:38:04 GMT

This is actually per JAX-WS spec.  Section 10.2.2.3.   For user faults, the
faultstring is taken from "ex.getMessage()".   The faultcode is always
env:Server.    The actor is always empty.

With CXF, you CAN create your own 
org.apache.cxf.binding.soap.SoapFault
exception and fill in everthing yourself.    According to spec, you should
be able to do the same thing with a javax.xml.ws.SOAPFaultException, but
that isn't working in CXF right now.   I fixed that on CXF's trunk earlier
this week so hopefully the next patch release of Geronimo will include it. 
(or possibly someone will write instructions on how to "update" the CXF in
Geronimo with newer versions)

Dan



Tomasz Mazan wrote:
> 
> I configured Geronimo to use CXF as WS engine. If I return any object by
> WebMethod - all look fine.
> The problem is with returning Fault - I throw exception annotated with
> @WebFault and want Fault to contain specified "faultcode" and
> "faultstring". What should I do ?
> 
> No, It looks like (for php WS-client)
> 
> ["faultstring"]=>
> string(61) "pl.netia.fonbsa.core.services.jws.exception.WSException: null"
> ["faultcode"]=>
> string(11) "soap:Server"
> 
> Any idea?
> 
> Beniamin
> 

-- 
View this message in context: http://www.nabble.com/Apache-CXF-web-service-and-returning-Fault-tf4391944s134.html#a12522857
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message