users@jax-rpc.java.net

Problems with Handler

From: Edoardo Causarano <edoardocausarano_at_tin.it>
Date: Mon, 6 Jun 2005 11:11:29 +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

-- 
Le montagne sono cosė: devi assecondarle anche se ti sputano in  
faccia fiele e veleno.
Perdi se pensi di essere pių forte.
Vinci se pensi che non c'č nessuna battaglia.
- Hans Kammerlander