on 09-17-2007 4:58 PM
Hello !
In my code I'm throwing SOAPFaultException with detailed SoupFault information,
but com.sap.engine.services.ejb.exceptions.BaseEJBException is overwrites it .
Do you have any idea how to keep my soup fault information.
with regards,
Costa
Thanks a lot for advice
Implementation of ((EJBException)t).getCausedByException() has not got expected result.
Still I'm getting BaseEJBException generic message "Exception in method encrypt" without my custom detailed information.
Any help will be great
Thanks
Costa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The logic flow troughs: Webservice to Netweaver Enterprise Java Bean (Stateless EJB). Most of the business logic stores in POJO (Plain Old Java Object).
Here the code snipped from Stateless EJB. I by reason setting wrong Crypto method and expecting to get custom exception definition which is defined in SOAPFaultException constactor
but getting container BaseEJBException with standard <faultstring>Exception in method encrypt.</faultstring>
public String encrypt(CriptoDTO criptoDTO) throws Exception
{
String retValue = null;
try {
retValue = new CryptorManager().getEncrypt(criptoDTO);
} catch (NoSuchAlgorithmException e)
{
throw new SOAPFaultException(" My custom exception + Cause");
}
return retValue;
}
Apprichaite your help.
Thanks
Costa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
afaik exceptions thrown by an ejb get wrapped by the container into an EJBException (and i think BaseEJBException is a SAP subclass ob EJBException).
Try to call getCausedByException() on the EJBException to get the underlaying exception.
(Some castings will be needed).
When calling the EJB from an remote application i think a RemoteException is thrown 'to the client', if Exception is of type RemoteException use getCause() to get underlaying exception
And maybe
<a href="http://edocs.bea.com/workshop/docs81/doc/en/core/index.html">this link</a> helps
regards
franz
reward points if useful
Hello
could you please give more details
- where (in ejb or something else)
- code snippet
regards
franz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
13 | |
13 | |
11 | |
10 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.