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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to