port.getServerHCI();
List handlerInfoList = new ArrayList();
// Insert an container handler as the first element.
// This is needed to perform method authorization checks.
HandlerInfo preHandler = rpcFactory.createHandlerInfo();
String handlerClassName = nextEndpoint.implementedByEjbComponent() ?
"com.sun.enterprise.webservice.EjbContainerPreHandler" :
"com.sun.enterprise.webservice.ServletPreHandler";
preHandler.setHandlerClassName(handlerClassName);
handlerInfoList.add(preHandler);
// Collect all roles defined on each handler and set them on
// handler chain. NOTE : There is a bit of a mismatch here between
// 109 and JAXRPC. JAXRPC only defines roles at the handler chain
// level, whereas 109 descriptors put roles at the handler level.
Collection soapRoles = new HashSet();
for(Iterator hIter = handlerChain.iterator(); hIter.hasNext();) {
WebServiceHandler nextHandler =
(WebServiceHandler) hIter.next();
HandlerInfo handlerInfo = createHandlerInfo(nextHandler);
handlerInfoList.add(handlerInfo);
soapRoles.addAll(nextHandler.getSoapRoles());
}
// Insert a container handler as the last element in the chain.
HandlerInfo postHandler = rpcFactory.createHandlerInfo();
handlerClassName = nextEndpoint.implementedByEjbComponent() ?
"com.sun.enterprise.webservice.EjbContainerPostHandler" :
"com.sun.enterprise.webservice.ServletPostHandler";
postHandler.setHandlerClassName(handlerClassName);
handlerInfoList.add(postHandler);
// @@@ should probably use addHandler api instead once
// == bug is fixed.
modelHandlerChain.setHandlersList(handlerInfoList);