axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Mazzucco <Michele.Mazzu...@ncl.ac.uk>
Subject Re: How to prevent that a handler is invoked for all services ?
Date Thu, 22 May 2008 09:22:05 GMT
http://ws.apache.org/axis2/1_4/modules.html


On 22 May 2008, at 09:04, stlecho wrote:

>
> Hi,
>
> We have developed and deployed 2 webservices in the same Tomcat  
> server. For
> one of these webservices, a custom handler should be invoked.
>
> When adding the handler to the PRE-DISPATCH or DISPATCH phase,  
> results in
> the same behaviour: the handler is invoked for both webservices :o(.
>
> Is there a way to specify a Handler that is only applied to a specific
> Service and/or Operation ?
>
> Adding the handler to the DISPATCH phase is done like this:
>
> ArrayList phases = service.getAxisConfiguration().getInFlowPhases();
> for (int i = 0; i < phases.size(); i++) {
>   Phase phase = (Phase)phases.get(i);
>   if (!phase.getName().equalsIgnoreCase(PhaseMetadata.PHASE_DISPATCH))
> continue;
>   phase.addHandler(new MustUnderstandHandler());
>   phase.addHandler(new SchemaValidationHandler());
>   break;
> }
>
> Regards, Stefan Lecho.
> -- 
> View this message in context: http://www.nabble.com/How-to-prevent- 
> that-a-handler-is-invoked-for-all-services---tp17399366p17399366.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>


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


Mime
View raw message