dev@jax-ws.java.net

Re: Service error handling

From: Doug Kohlert <Doug.Kohlert_at_Sun.COM>
Date: Fri, 03 Mar 2006 11:40:25 -0800

Resending, not everyone saw this.

Oleksiy Stashok wrote:

> Hi,
>
> I'm looking for implementation of Http transport on server side and
> specifically class com.sun.xml.ws.transport.http.HttpAdapter and its
> inner class HttpToolkit.
>
> I have one question, how good is solution to send error code using
> http status.
> ........................
> try {
> packet =
> head.process(packet,con.getWebServiceContextDelegate(),this);
> } catch(Exception e) {
> e.printStackTrace();
> if (!closed) {
> writeInternalServerError(con);
> }
> return;
> }
> .........................
> I found if essentially service implementation method throws exception
> - then it is caught and fail message is created and sent back, but if
> some other error occurs on server not in service implementation
> method, then just http status sets as error.
> Is it correct way? Don't we need to send fail message in any case?
>
> Thanks.
> WBR,
> Alexey.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: dev-help_at_jax-ws.dev.java.net
>

-- 
 - Doug