users@jax-rpc.java.net

Handler problems

From: Edoardo Causarano <curious.corn_at_katamail.com>
Date: Mon, 6 Jun 2005 11:29:32 +0200

I can't get handlers to work; as far as I've understood this client
code should init the handler class before the remote method call but
nothing happens as far as handlers are concerned. I've looked around
but there's nothing except boilerplate tutorials. Can anyone please
give me a hint? Does changing the stub address break handler chains?

             Stub pstub = (Stub) port;
             pstub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY,
Boolean.TRUE);
             pstub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:8081/service/server");
             port = (ServerPort) pstub;

             HandlerRegistry registry = fact.getHandlerRegistry();
             List hc = registry.getHandlerChain(
                     new QName("http://localhost:8081/service/server"));
             HandlerInfo hi = new HandlerInfo();

             hi.setHandlerClass(Handler.class);
// populate the properties
             Hashtable hashtable = new Hashtable();
             hashtable.put("key", "value");

// set the properties in handler
             hi.setHandlerConfig(hashtable);
             hc.add(hi);

e