axis-java-user mailing list archives

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

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


Mime
View raw message