axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Suriarachchi <amilasuriarach...@gmail.com>
Subject Re: AXIS2-2881 Axis2 Exception Handling
Date Mon, 02 Mar 2009 05:05:46 GMT
On Sat, Feb 28, 2009 at 3:35 AM, Willard, Jonathan
<Jonathan.Willard@ca.com>wrote:

>  Hi
>
>
>
> I am migrating working Axis1.4 code to Axis2 and I am having the same
> problem with Axis2-1.4 as described in JIRA AXIS2-2881.  It appears that was
> resolved in Axis2-1.3.
>
>
>
> Does anyone have any knowledge or experience with this?  My Service looks
> like this:
>
>
>
> public class JonIf
>
> {
>
>     public String getJonInfo() throws JonException
>
>     {
>
>         return "Hello World"  ;
>
>     }
>
> }
>
> The JonException extends Exception but the compiler says the following when
> compiling the server files.
>
>
>
> compileServer:
>
>     [javac] Compiling 4 source files to X:\top\java\dev\classes
>
>     [javac]
> X:\top\java\dev\src\com\company\api\jon\server\JonIfMessageReceiverInOut.java:56:
> incompatible types
>
>     [javac] found   : com.company.api.jon.server.JonException
>
>     [javac] required: java.lang.Throwable
>
>     [javac]         } catch (JonException e) {
>
>     [javac]                  ^
>

At the client side Axis2 generates  a class for  your exceptions. you need
to use that class at the server side.

thanks,
Amila.

>
>
> Have I missed some obvious difference or migration step in moving from 1.4
> to 2?
>
>
>
> Thanks all,
>
>
>
> *Jon Willard*
>
>
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Mime
View raw message