You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Thomas Drumm <td...@cbb.dk> on 2010/07/04 20:18:22 UTC

Axis1 exception handling client side

Hi everybody,

We have a Web Services API configured with Axis1 which exposes services to other programs.

When we use WSDL2Java (also Axis1) to generate client stub files, we're having problems with exception handling. Everything gets wrapped up in AxisFaults, which is no good for us.

We've tried the following:

1. We made the exceptions thrown by the web services extend RemoteException. This seems to cause Axis1 problems when generating the WSDL. Only the first exception thrown is correctly WSDL'ed, with the rest for some reason looking as they did if they weren't extending RemoteException. Furthermore, even the correctly mapped exception is still wrapped in AxisFault on the client side.

2. We made the exceptions thrown by the web services extend AxisFault. This caused the client side code to translate the exception into the server-side exception and not the client side exception, which causes great confusion, since the stub files on the client side are expecting client side mappings of exceptions.

Can anyone give me some hints as to approach this correctly?

We are on a very tight deadline, and migration to another API, say Axis2 or Sun's JAX-WS is out of the question, unless you have a suggestion for an easily-implementable framework.

Thanks in advance and regards, Thomas

Re: Axis1 exception handling client side

Posted by Andreas Veithen <an...@gmail.com>.
As part of the promotion of the Axis project to a top level project,
we have decided to create separate mailing lists for Axis 1 and Axis2.
For all Axis 1 related questions please subscribe and post to
axis1-java-user@axis.apache.org. Thanks!

Andreas


On Sun, Jul 4, 2010 at 20:18, Thomas Drumm <td...@cbb.dk> wrote:
> Hi everybody,
>
> We have a Web Services API configured with Axis1 which exposes services to
> other programs.
>
> When we use WSDL2Java (also Axis1) to generate client stub files, we're
> having problems with exception handling. Everything gets wrapped up in
> AxisFaults, which is no good for us.
>
> We've tried the following:
>
> 1. We made the exceptions thrown by the web services extend RemoteException.
> This seems to cause Axis1 problems when generating the WSDL. Only the first
> exception thrown is correctly WSDL'ed, with the rest for some reason looking
> as they did if they weren't extending RemoteException. Furthermore, even the
> correctly mapped exception is still wrapped in AxisFault on the client side.
>
> 2. We made the exceptions thrown by the web services extend AxisFault. This
> caused the client side code to translate the exception into the server-side
> exception and not the client side exception, which causes great confusion,
> since the stub files on the client side are expecting client side mappings
> of exceptions.
>
> Can anyone give me some hints as to approach this correctly?
>
> We are on a very tight deadline, and migration to another API, say Axis2 or
> Sun's JAX-WS is out of the question, unless you have a suggestion for an
> easily-implementable framework.
>
> Thanks in advance and regards, Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Axis1 exception handling client side

Posted by Thomas Drumm <td...@cbb.dk>.
Hi everybody,

We have a Web Services API configured with Axis1 which exposes services to other programs.

When we use WSDL2Java (also Axis1) to generate client stub files, we're having problems with exception handling. Everything gets wrapped up in AxisFaults, which is no good for us.

We've tried the following:

1. We made the exceptions thrown by the web services extend RemoteException. This seems to cause Axis1 problems when generating the WSDL. Only the first exception thrown is correctly WSDL'ed, with the rest for some reason looking as they did if they weren't extending RemoteException. Furthermore, even the correctly mapped exception is still wrapped in AxisFault on the client side.

2. We made the exceptions thrown by the web services extend AxisFault. This caused the client side code to translate the exception into the server-side exception and not the client side exception, which causes great confusion, since the stub files on the client side are expecting client side mappings of exceptions.

Can anyone give me some hints as to approach this correctly?

We are on a very tight deadline, and migration to another API, say Axis2 or Sun's JAX-WS is out of the question, unless you have a suggestion for an easily-implementable framework.

Thanks in advance and regards, Thomas