on 06-18-2009 10:51 AM
Hi all,
I am exposing ejb2-based webservices and am unable to find a way to throw checked Exceptions.
Could anyone provide resources about how to leverage SOAP/WSDL features of exception handling (i.e. wsdl:fault tag)?
Thanks, regards
Vincenzo
Hello Vincenzo,
It should be possible if you have defined an own Exception in your business method of the EJB.
The Exception will get published as Fault Message in your WebService /generated WSDL.
With best regards
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, thanks for replying
actually on saphelp I found that supported Exceptions are:
java.lang.Exception -> no fault generated
java.rmi.RemoteException -> deploy refused with explicit error (RemoteException not allowed in ejb business method signature)
java.lang.Throwable -> doesn't seem very appropriate to use such a root class
Any suggestion?
Thanks, regards
Vincenzo
Hi,
Yes it must be present in the interface (a remote interface should be enough) and the implementation.
Just delete alle Web Service Metafiles (Virtual interface, etc) and try to create the Web Service newly.
It should have then an the Exception in the VI Types section which leads to a defined Fault Message in
the WSDL.
With best regards
Sebastian
Vincenzo,
My problem is, I'm using a SOAPhandler along with my EJB webservice. Without the handler the faultstring looks good. but when I have the handler on the faultstring has -'javax.ejb.EJBException: Exception raised from invocation...... '. As the handler is getting the ejb exception.
Have you used Handlers much?
Thanks,
Rajiv.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.