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