Package org.apache.geronimo.xbeans.javaee

Examples of org.apache.geronimo.xbeans.javaee.HandlerChainsType


            BusFactory.setThreadDefaultBus(null);
        }
    }
   
    protected HandlerChainsType getHandlerChains() {
        HandlerChainsType types = null;
        try {
            types = HandlerChainsUtils.getHandlerChains(this.handlerChainsXML);
        } catch (Exception e) {
            LOG.warn("Failed to deserialize handler chains", e);
        }
View Full Code Here


   
    public static void insertHandlers(ServiceRefType serviceRef, URL url) throws Exception {
        // Bind the XML handler chain file to an XMLBeans document
        XmlObject xml = XmlBeansUtil.parse(url, null);
        HandlerChainsDocument hcd = (HandlerChainsDocument) XmlBeansUtil.typedCopy(xml, HandlerChainsDocument.type);
        HandlerChainsType handlerChains = hcd.getHandlerChains();
       
        ServiceRefHandlerChainsType serviceRefHandlerChains = serviceRef.addNewHandlerChains();
        for (HandlerChainType handlerChain : handlerChains.getHandlerChainArray()) {
            ServiceRefHandlerChainType serviceRefHandlerChain = serviceRefHandlerChains.addNewHandlerChain();
            if (handlerChain.getPortNamePattern() != null) {
                serviceRefHandlerChain.setPortNamePattern(handlerChain.getPortNamePattern());
            }
            if (handlerChain.getServiceNamePattern() != null) {
View Full Code Here

public class Axis2HandlerResolverTest extends TestSupport {

    public void testBasic() throws Exception {
        InputStream in = getClass().getResourceAsStream("/handlers.xml");
        assertTrue(in != null);
        HandlerChainsType handlerChains = toHandlerChains(in);
        assertEquals(3, handlerChains.getHandlerChainArray().length);
       
        Axis2HandlerResolver resolver =
            new Axis2HandlerResolver(getClass().getClassLoader(), getClass(), handlerChains, null);
       
        List<Handler> handlers = null;
View Full Code Here

    }

    public void testServiceMatching() throws Exception {
        InputStream in = getClass().getResourceAsStream("/handlers_service.xml");
        assertTrue(in != null);
        HandlerChainsType handlerChains = toHandlerChains(in);
        assertEquals(3, handlerChains.getHandlerChainArray().length);
       
        Axis2HandlerResolver resolver =
            new Axis2HandlerResolver(getClass().getClassLoader(), getClass(), handlerChains, null);
       
        List<Handler> handlers = null;
View Full Code Here

    }
   
    public void testBindingMatching() throws Exception {
        InputStream in = getClass().getResourceAsStream("/handlers_bindings.xml");
        assertTrue(in != null);
        HandlerChainsType handlerChains = toHandlerChains(in);
        assertEquals(3, handlerChains.getHandlerChainArray().length);
       
        Axis2HandlerResolver resolver =
            new Axis2HandlerResolver(getClass().getClassLoader(), getClass(), handlerChains, null);
       
        List<Handler> handlers = null;
View Full Code Here

    }
   
    public void testPortMatching() throws Exception {
        InputStream in = getClass().getResourceAsStream("/handlers_port.xml");
        assertTrue(in != null);
        HandlerChainsType handlerChains = toHandlerChains(in);
        assertEquals(3, handlerChains.getHandlerChainArray().length);
       
        Axis2HandlerResolver resolver =
            new Axis2HandlerResolver(getClass().getClassLoader(), getClass(), handlerChains, null);
       
        List<Handler> handlers = null;
View Full Code Here

    }
   
    public void testMixedMatching() throws Exception {
        InputStream in = getClass().getResourceAsStream("/handlers_mixed.xml");
        assertTrue(in != null);
        HandlerChainsType handlerChains = toHandlerChains(in);
        assertEquals(3, handlerChains.getHandlerChainArray().length);
       
        Axis2HandlerResolver resolver =
            new Axis2HandlerResolver(getClass().getClassLoader(), getClass(), handlerChains, null);
       
        List<Handler> handlers = null;
View Full Code Here

     * Gets the right handlers for the port/service/bindings and
     * performs injection.
     */
    protected void configureHandlers() throws Exception {
        String xml = this.portInfo.getHandlersAsXML();
        HandlerChainsType handlerChains = xml == null ? null : HandlerChainsDocument.Factory.parse(xml).getHandlerChains();
        Axis2HandlerResolver handlerResolver =
            new Axis2HandlerResolver(endpointInstance.getClass().getClassLoader(),
                                   endpointInstance.getClass(),
                                   handlerChains,
                                   this.annotationProcessor);
View Full Code Here

TOP

Related Classes of org.apache.geronimo.xbeans.javaee.HandlerChainsType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.