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 Pham Hoai Van <va...@fsoft.com.vn> on 2005/04/28 13:39:39 UTC
could not get HandlerInfo config information from handlerRequest ?
See my following code. In handlerRequeset function why am i get
map.get("krbws_action")=null all the time ? Any help will be appriciate
much. Thanks
public static void main(String[] args) {
AddFunction1Service srv = new AddFunction1ServiceLocator();
ArrayList handlerInfo = new
ArrayList() ;
Map config = new HashMap();
config.put("krbws_action","KerberosSecurity");
QName name = new
javax.xml.namespace.QName("http://localhost:9999/axis/services/AddFuncti
on1Service", "AddFunction1Service");
QName[] lstName = {name};
HandlerInfo hi = new
HandlerInfo();
hi.setHandlerClass(ClientSecurityHandler.class);
hi.setHandlerConfig(config);
hi.setHeaders(lstName);
handlerInfo.add(hi);
srv.getHandlerRegistry().setHandlerChain(name,handlerInfo);
Complex a = new Complex(1.2,2);
Complex b = new Complex(1.2,2);
AddFunction1 fun =
srv.getAddFunction1Service();
Complex c = fun.addComplex(a,b);
System.out.print("Result:"+ c.getI()
+ " " + c.getR());
public class ClientSecurityHandler implements
javax.xml.rpc.handler.Handler {
private HandlerInfo info;
public void init(HandlerInfo config) {
info = config;
}
.....
public boolean handleRequest(MessageContext context) {
Map map = info.getHandlerConfig();
System.out.println("Information: "+map.get("krbws_action"));
.....
-----------------------------
Pham Hoai Van
Y!: hoaivanpham <ymsgr:sendIM?hoaivanpham>