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 Mik Goodhelp <ws...@gmail.com> on 2005/04/25 13:02:43 UTC

How to dynamically configure an Handler in the Global Request and Response chain for different services?.

HOw it is possible to configure at runtime an Handler in the general
chain, or anyway capable to intercept all the outgoing or incoming
traffic  generated by each service-Provider or Requestor?
I have found this on the net:
http://www.cetis.ac.uk/members/scott

But in this way i need to attach my handlers to each Service and this
is precisely what i don't want to do.
{
 EngineConfiguration clientConfig=createClientConfig(); 
 service.setEngineConfiguration(clientConfig); 
 service.setEngine(new AxisClient(clientConfig));
}

what i would like to do is to dynamically configure  Handlers for all services.
Is it possibloe to do something like the following??:

{
 private EngineConfiguration createClientConfig() 
	{ 
                SimpleProvider clientConfig=new SimpleProvider(); 
	Handler GeneralHandler= (Handler) new BasicHandler();
	GeneralHandler.setOption(MyOption,"blabla");
                ....????.....????....

                 Attach the Handler to all services 
                  return clientConfig;  
                }

And then ...
EngineConfiguration clientConfig=createClientConfig(); 
????...                        /????...
Pass the configuration to all services?

}