Opened 17 years ago

Closed 17 years ago

#862 closed defect (fixed)

Web services server doesn't return exceptions from methods marked as 'void'

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: BASE 2.5
Component: webservices Version:
Keywords: Cc:

Description

For example, trying to use the SessionService.login() method with an invalid username or password results in an exception on the server side. The exception seems to not be passed on to the client. If the method is changed to return a string (or possible some other object), the exception is returned to the client as well.

Change History (2)

comment:1 by Nicklas Nordborg, 17 years ago

Owner: changed from Martin Svensson to Nicklas Nordborg
Status: newassigned

It also seems to work if, for example, a throws BaseException is added to the method declaration. However, the WSDL generation complains:

[java2WSDL] 14:30:20,550 ERROR AxisService:1838 - Required MessageReceiver couldn't be found, thus, default MessageReceiver has been used

The resulting WSDL file is very different from the original one and includes definitions for BaseException, RuntimeException, and it's superclasses... I wonder if this is a good idea....

comment:2 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [4038]) Fixes #862: Web services server doesn't return exceptions from methods marked as 'void'

Note: See TracTickets for help on using tickets.