Skip to Content
Former Member
Dec 27, 2007 at 11:54 AM

Exception handling web dynpro and adaptive web service model


Hi Experts,

I have a problem with my eexception handling in my web service model.

My Model is an adaptive web service model. It has a session bean where a exception is thrown. But I can't catch this exception in web Dynpro. My code is like the following

Session bean:

public sessionMeth() throws MyException{



throw new MyException("Reason of Exception");


wd Custom controller:




}catch(WDWSModelExecuteException e){

IWDMessageManager msgMan = wdComponentAPI.getMessageManager();

msgMan.reportException(a.getCause().getMessage(), true);


when I run this I get an unhandled ClassCastException what means my app aborts. When I replace the WDWSModelExecuteException by an normal Exception I can catch the classCastException but I don't get the message I have thrown in my Session Bean.

When I test my WebService in the Web Service Navigator I get the message in the faultString of the repsonse. So I guess the Web Service is ok.

So what is the right approach to handle this?

Any help is appreciated.

Regards Manuel