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

项目: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);
}
项目:tomee    文件:AxisService.java   
@SuppressWarnings({"unchecked"})
private List<HandlerInfo> createHandlerInfos(List<HandlerChainData> handlerChains) throws ClassNotFoundException {
    if (handlerChains == null || handlerChains.isEmpty()) return null;
    List<HandlerData> handlers = handlerChains.get(0).getHandlers();

    List<HandlerInfo> handlerInfos = new ArrayList<HandlerInfo>(handlers.size());
    for (HandlerData handler : handlers) {
        Class<?> handlerClass = handler.getHandlerClass();
        Map initParams = new HashMap(handler.getInitParams());
        QName[] headers = handler.getSoapHeaders().toArray(new QName[handler.getSoapHeaders().size()]);
        HandlerInfo handlerInfo = new HandlerInfo(handlerClass, initParams, headers);
        handlerInfos.add(handlerInfo);
    }

    return handlerInfos;
}
项目: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    文件:AxisService.java   
protected HttpListener createPojoWsContainer(ClassLoader loader, URL moduleBaseUrl, PortData port, String serviceId, Class target, Context context, String contextRoot, Map<String, Object> bdgs, ServiceConfiguration serviceInfos) throws Exception {
    ClassLoader classLoader = target.getClassLoader();

    // todo build JaxRpcServiceInfo in assembler
    JaxRpcServiceInfo serviceInfo = getJaxRpcServiceInfo(classLoader);

    // Build java service descriptor
    JavaServiceDescBuilder javaServiceDescBuilder = new JavaServiceDescBuilder(serviceInfo, classLoader);
    JavaServiceDesc serviceDesc = javaServiceDescBuilder.createServiceDesc();

    // Create service
    RPCProvider provider = new PojoProvider();
    SOAPService service = new SOAPService(null, provider, null);
    service.setServiceDescription(serviceDesc);

    // Set class name
    service.setOption("className", target.getName());

    // Add Handler Chain
    List<HandlerInfo> handlerInfos = createHandlerInfos(port.getHandlerChains());
    HandlerInfoChainFactory handlerInfoChainFactory = new HandlerInfoChainFactory(handlerInfos);
    service.setOption(org.apache.axis.Constants.ATTR_HANDLERINFOCHAIN, handlerInfoChainFactory);

    // Create container
    AxisWsContainer container = new AxisWsContainer(port.getWsdlUrl(), service, null, classLoader);
    wsContainers.put(serviceId, container);
    return container;
}
项目:tomee    文件:HandlerChainImpl.java   
@SuppressWarnings({"unchecked"})
public HandlerChainImpl(List<HandlerInfo> handlerInfos, String[] roles) {
    this.roles = roles;
    for (int i = 0; i < handlerInfos.size(); i++) {
        HandlerInfo handlerInfo = handlerInfos.get(i);
        try {
            Handler handler = (Handler) handlerInfo.getHandlerClass().newInstance();
            handler.init(handlerInfo);
            add(handler);
        } catch (Exception e) {
            throw new JAXRPCException("Unable to initialize handler class: " + handlerInfo.getHandlerClass().getName(), e);
        }
    }
}
项目:jplag    文件:LoggingHandler.java   
public void init(HandlerInfo arg) {
    info=arg;
}
项目:jplag    文件:JPlagClientAccessHandler.java   
/**
 * Save the HandlerInfo object
 */
public void init(HandlerInfo arg) {
    info=arg;
}
项目:jplag    文件:JPlagServerAccessHandler.java   
public void init(HandlerInfo arg) {
    info = arg;
}
项目:jplag    文件:JPlagClientAccessHandler.java   
/**
 * Save the HandlerInfo object
 */
public void init(HandlerInfo arg) {
    info = arg;
}
项目:windup-rulesets    文件:JaxRpcGenericHandlerTest.java   
public void init(HandlerInfo arg)
{
    info = arg;
}
项目:windup-rulesets    文件:JaxRpcGenericHandlerTest.java   
public void init(HandlerInfo arg)
{
    info = arg;
}
项目:wso2-wss4j    文件:WSS4JHandler.java   
/**
 * Initializes the instance of the handler.
 */
public void init(HandlerInfo hi) {
    handlerInfo = hi;
}
项目:tomee    文件:EjbRpcProvider.java   
public EjbRpcProvider(BeanContext ejbDeployment) {
    this.ejbDeployment = ejbDeployment;
    this.handlerInfos = new ArrayList<HandlerInfo>();
}
项目:tomee    文件:EjbRpcProvider.java   
public EjbRpcProvider(BeanContext ejbDeployment, List<HandlerInfo> handlerInfos) {
    this.ejbDeployment = ejbDeployment;
    this.handlerInfos = handlerInfos;
}
项目:tomee    文件:HandlerChainImpl.java   
public HandlerChainImpl(List<HandlerInfo> handlerInfos) {
    this(handlerInfos, null);
}