Service service = (Service) ic.lookup(
java:comp/env/service/SDFWs);
servicePort = service.getPort(com.sdf.SDFWsSEI.class);
String targetNameSpace = "urn:SDFWs/wsdl"; // This target namespace from WSDL
// <definitions name="SDFWs" targetNamespace="urn:SDFWs/wsdl"
QName portName = new QName(targetNameSpace,"SDFWs");
HandlerRegistry registry = service.getHandlerRegistry();
if(registry != null){
List handlerList = new ArrayList();
handlerList.add(new HandlerInfo(ClientHandler.class,null,null));
registry.setHandlerChain(portName, handlerList);
cache.put(jndiHomeName, servicePort);
}
In the above snippet of code, iam getting NullPointerException at line
HandlerRegistry registry = service.getHandlerRegistry();
Not able to HandlerRegistry.
What could be the problem?
Please let me know if there is some problem the way oam registering the Handler.
thanks in advance.