Java 类javax.xml.rpc.handler.HandlerRegistry 实例源码

项目:tomcat7    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:apache-tomcat-7.0.73-with-comment    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:class-guard    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:wso2-wss4j    文件:TestJAXRPCHandler.java   
public void invokeService (Map config, int interopNum) throws Exception {
    PingServiceLocator service = new PingServiceLocator();

    List handlerChain = new ArrayList();
    handlerChain.add(new HandlerInfo( WSS4JHandler.class, config, null));

    HandlerRegistry registry = service.getHandlerRegistry();
    registry.setHandlerChain(new QName("Ping" + interopNum), handlerChain);

    service.getHandlerRegistry().getHandlerChain(new QName("http://xmlsoap.org/Ping", "ticketType"));

    java.lang.reflect.Method method = service.getClass().getMethod("getPing" + interopNum, new Class[] {URL.class});

    PingPort port = (PingPort) method.invoke (service, new Object[] {new URL("http://localhost:8080/axis/services/Ping" + interopNum)});
    StringHolder text =
            new StringHolder("WSS4J - Scenario" + interopNum + " @ [" + new java.util.Date(System.currentTimeMillis()) + "]");
    port.ping(new org.apache.ws.axis.oasis.ping.TicketType("WSS4J" + interopNum), text);
    System.out.println(text.value);
}
项目:apache-tomcat-7.0.57    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:apache-tomcat-7.0.57    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:WBSAirback    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerInfo, ArrayList<String> soaprolesToAdd) {
    HandlerChain handlerChain = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    @SuppressWarnings("unchecked") // Can't change the API
    Iterator<Handler> iter = handlerChain.iterator();
    while (iter.hasNext()) {
        Handler handler = iter.next();
        handler.init(handlerInfo);
    }
    String[] soaprolesRegistered = handlerChain.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = soaprolesToAdd.get(j);
    handlerChain.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerChain);
}
项目:lams    文件:ServiceRefFactory.java   
private void initHandlerChain(QName portName, HandlerRegistry handlerRegistry,
        HandlerInfo handlerref, ArrayList soaprolesToAdd) {
    HandlerChain handlerList = (HandlerChain) handlerRegistry.getHandlerChain(portName);
    handlerList.add(handlerref);
    String[] soaprolesRegistered = handlerList.getRoles();
    String [] soaproles = new String[soaprolesRegistered.length + soaprolesToAdd.size()];
    int i;
    for (i = 0;i < soaprolesRegistered.length; i++)
        soaproles[i] = soaprolesRegistered[i];
    for (int j = 0; j < soaprolesToAdd.size(); j++)
        soaproles[i+j] = (String) soaprolesToAdd.get(j);
    handlerList.setRoles(soaproles);
    handlerRegistry.setHandlerChain(portName, handlerList);
}
项目:tomee    文件:ServiceImpl.java   
public HandlerRegistry getHandlerRegistry() {
    throw new UnsupportedOperationException();
}