Skip to Content
author's profile photo
Former Member

Exception Handling when using Webservice Model


The Tutorial 7 shows how to use the QuickCarRental EJB-application with webdynpro. The webdynpro model is a webservice model.

The QuickCarRentalException - in case of an error thrown by a SessionBean - will be caught inside the WebDynpro-Controller the following way:

<i> //@@begin onActionRentCar(ServerEvent)

try {



MessageManager msgMgr=

(MessageManager) wdThis.wdGetAPI().getComponent().getMessageManager();



catch(Exception ex) {



MessageManager msgMgr =

(MessageManager) wdThis.wdGetAPI().getComponent().getMessageManager();

msgMgr.reportException(ex.getLocalizedMessage(), true);



<b>The Probelm is:</b>

The Exception has lost its state information (message, stacktrace, cause). The information shown in the statusbar is therefore a nullstring. Logging the exception using <i>toString</i> only shows the package+classname.

<b>Conclusion:</b> This Exception-Handling is not sufficient.

<b>Question:</b> How to handle Server Side Exceptions right? Is there a SAP defined way (SOAPFaultExceptions, ..) which can be used to transport the error information from server to client?


Ulf Helmke

Message was edited by: Ulf Helmke

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jul 27, 2004 at 08:19 AM

    Hello Ulf,

    Seems to be a bug. I will open a message for this.

    Best regards,


    Add comment
    10|10000 characters needed characters exceeded