The only solution I have found is to implement the web service in a simple class which calls the EJB.
Vincent Deschenes
From: Vincent Deschênes [mailto:vdeschenes_at_stelvio.com]
Sent: Monday, March 22, 2010 11:27 AM
To: ejb_at_glassfish.dev.java.net
Subject: How to throw a SOAPFaultException from an EJB
I am trying to throw a SOAPFaultException from a web service implemented on an EJB.
If I simply throw new SOAPFaultException(…)
I get this SoapFault
<S:Fault xmlns:ns4="
http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Server</faultcode>
<faultstring>javax.ejb.EJBException</faultstring>
</S:Fault>
Which describe an javax.ejb.EJBException which is caused by me throwing my SOAPFaultException. I can see it if I enable the
stacktrace in the exception.
If I disable the stack trace I always get this EJBException and I have no way to set an error message.
Anyone has a solution ?
I am using glassfish V3.
Thanks.
Vincent Deschenes