axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stlecho <>
Subject How to prevent that a handler is invoked for all services ?
Date Thu, 22 May 2008 08:04:03 GMT


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))
  phase.addHandler(new MustUnderstandHandler());
  phase.addHandler(new SchemaValidationHandler());

Regards, Stefan Lecho.
View this message in context:
Sent from the Axis - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message