I was not aware of the "special" client-config.wsdd that people replied about, but here are two equivalent (I believe) ways to programmatically deploy a client handler:

1) register handler chain directly:

Class clazz = MyHandler.class;
Map config = new HashMap();
QName[] headers = null;
HandlerInfo info = new HandlerInfo(clazz, config, headers);
HandlerRegistry registry = service.getHandlerRegistry();
List chain = registry.getHandlerChain((QName) portName);
chain.add(info);

2) dynamically deploy static wsdl:

Class handlerclass= MyHandler.class;
String wsdd =
"<deployment xmlns=\"http://xml.apache.org/axis/wsdd/\"; " +
"xmlns:java=\"" + WSDDConstants.URI_WSDD_JAVA + "\">\n" +
" <transport name=\"http\" pivot=\"java:" +
handlerclass + "\"/>\n" +
/*" <service name=\"" + WSDDConstants.URI_WSDD + "\" provider=\"java:MSG\">\n" +
" <parameter name=\"allowedMethods\" value=\"AdminService\"/>\n" +
" <parameter name=\"className\" value=\"org.apache.axis.utils.Admin\"/>\n" +
" </service>\n" +*/
"</deployment>";


EngineConfiguration config = new XMLStringProvider(wsdd);
AxisClient client = new AxisClient(config);
service.setEngine(client);

This would also allow for more than one axis client configuration (if I understand correctly using client-config.wsdd would apply to ALL clients?)

Aaron Hamid

[EMAIL PROTECTED] wrote:

Hello

I have a simple servlet (not a web service) deployed on tomcat, it works
like a normal servlet : receveiving http request and sending http response.
But this servlet also have to invoke an axis webservice to get some
information : no problem with that : it works !
The problem start here : I would like to define an handler on the client
side : on the servlet.
I think there's something to do with client-config.wsdd but I don't
understand how it works, where it's located....
Can somebody explain me how to do that ?

Thanks

Valerie






Reply via email to