Hi Lahiru,

A great finding!! +1 for fixing this issue with changing the return type to
boolean. As we already know there are quite a lot of limitations in the
Axis2 version we are using today. May be at some point we could move all
our internal web services to REST.

Thanks

On Sun, May 10, 2015 at 10:11 AM, Lahiru Sandaruwan <[email protected]>
wrote:

> Hi all,
>
> I have been looking into solving issues in $subject. Found that, currently
> if the back end service method return type is void, service stub throws an
> AxisFault with the message of custom exception message, but not the exact
> exception.
>
> One solution is, to have a boolean return value, for the methods that are
> having return type void, for the purpose of catching custom exceptions.
>
> According to [1], we can throw custom exceptions as below and catch as
> well.
>
> throw new AxisFault(new QName("http://test.org";, "FaultCode", "test"),
> "FaultReason", new Exception("This is a test Exception"));
>
> But i prefer former way as it is crystal clear. Shall we go ahead with
> that?
>
> Wdyt?
>
> [1] http://wso2.com/library/171/
>
> Thanks.
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> phone: +94773325954
> email: [email protected] blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to