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 va...@bull.net on 2004/02/05 10:08:29 UTC

Réf. : Re: question about handlers


The wssd for the service looks like this :

 <service name="Myappli1" provider="java:RPC">
      <requestFlow>
            <handler type="soapmonitor"/>
            <handler type="java:filtres.handler1"/>
      </requestFlow>
      <responseFlow>
            <handler type="java:filtres.handler1"/>
            <handler type="soapmonitor"/>
      </responseFlow>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="className" value="appli1.Myappli1"/>
 </service>

and here is the handler :

(See attached file: handler1.java)

this handler works very well except for error handling.
Another important thing is I also have a handler on the client side (nearly the same),
but it does not seems to be invoked when an axis fault is thrown on the server side.

Valerie





Venkatesh Kancharla <ve...@strandgenomics.com> sur 05/02/2004 06:19:01

Veuillez répondre à axis-user@ws.apache.org

Pour : axis-user@ws.apache.org
cc :
Objet :     Re: question about handlers


Can you please post your handler and the wsdd file?

regards
Venkatesh

On Wed, 4 Feb 2004 valerie.bauche@bull.net wrote:

> Hello
>
> I have a simple client and a simple service which have a handler on its
> request flow.
> My handler must sometimes refuse the access to the service. In this case,
I
> want it to return a special error message to the client.
> How can I do this ?
> I've tried throwing an AxisFault, but on the client I can't get the error
> message : only get an axisFault with NullPointerException
>
>
> Valerie
>
>







RE: Réf. : Re: question about handlers

Posted by chris <ch...@cobia.net>.
Valerie - 

Place an onFault method in the handler to intercept faults. The
signature is ' public void onFault(MessageContext msgContext)'

/Chris

-----Original Message-----
From: valerie.bauche@bull.net [mailto:valerie.bauche@bull.net] 
Sent: Thursday, February 05, 2004 4:08 AM
To: axis-user@ws.apache.org
Subject: Réf. : Re: question about handlers



The wssd for the service looks like this :

 <service name="Myappli1" provider="java:RPC">
      <requestFlow>
            <handler type="soapmonitor"/>
            <handler type="java:filtres.handler1"/>
      </requestFlow>
      <responseFlow>
            <handler type="java:filtres.handler1"/>
            <handler type="soapmonitor"/>
      </responseFlow>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="className" value="appli1.Myappli1"/>
 </service>

and here is the handler :

(See attached file: handler1.java)

this handler works very well except for error handling.
Another important thing is I also have a handler on the client side
(nearly the same),
but it does not seems to be invoked when an axis fault is thrown on the
server side.

Valerie





Venkatesh Kancharla <ve...@strandgenomics.com> sur 05/02/2004
06:19:01

Veuillez répondre à axis-user@ws.apache.org

Pour : axis-user@ws.apache.org
cc :
Objet :     Re: question about handlers


Can you please post your handler and the wsdd file?

regards
Venkatesh

On Wed, 4 Feb 2004 valerie.bauche@bull.net wrote:

> Hello
>
> I have a simple client and a simple service which have a handler on
its
> request flow.
> My handler must sometimes refuse the access to the service. In this
case,
I
> want it to return a special error message to the client.
> How can I do this ?
> I've tried throwing an AxisFault, but on the client I can't get the
error
> message : only get an axisFault with NullPointerException
>
>
> Valerie
>
>