Examples of HandlerChainsType


Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

    public void testServiceWithComposite() {
        QName serviceQName = new QName(namespaceURI, svcLocalPart);
        QName portQName = new QName(namespaceURI, portLocalPart);
        // Create a composite with a JAXB Handler Config
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        HandlerChainsType handlerChainsType = getHandlerChainsType();
        sparseComposite.setHandlerChainsType(handlerChainsType);

        ServiceDelegate.setServiceMetadata(sparseComposite);
        Service service = Service.create(serviceQName);
        ClientMetadataHandlerChainTestSEI port = service.getPort(portQName, ClientMetadataHandlerChainTestSEI.class);
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

        Service service = Service.create(serviceQName);
       
        // Create a composite with a JAXB Handler Config
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        HandlerChainsType handlerChainsType = getHandlerChainsType();
        sparseComposite.setHandlerChainsType(handlerChainsType);
        ServiceDelegate.setPortMetadata(sparseComposite);
        ClientMetadataHandlerChainTestSEI port = service.getPort(portQName, ClientMetadataHandlerChainTestSEI.class);

        // Verify the HandlerResolver on the service knows about the handlers in the sparse composite
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

            PortInfo pi = new DummyPortInfo();

            // Create a Service specifying a sparse composite and verify the
            // ports under that service get the correct handlers associated.
            DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
            HandlerChainsType handlerChainsType = getHandlerChainsType();
            sparseComposite.setHandlerChainsType(handlerChainsType);
            ServiceDelegate.setServiceMetadata(sparseComposite);
            Service service1 = Service.create(serviceQName);

            // Create a second instance of the same Service, but without
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

            assertEquals(0, list1.size());

            // Create a Port specifying a sparse composite and verify the
            // port gets the correct handlers associated.
            DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
            HandlerChainsType handlerChainsType = getHandlerChainsType();
            sparseComposite.setHandlerChainsType(handlerChainsType);
            ServiceDelegate.setPortMetadata(sparseComposite);
            QName portQName1 = new QName(namespaceURI, portLocalPart);
            ClientMetadataHandlerChainTestSEI port1 =
                    service1.getPort(portQName1, ClientMetadataHandlerChainTestSEI.class);
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

       
        Service service = Service.create(serviceQN);

        // The SEI has a HandlerChain annotation, but the sparse metadata should override it
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        HandlerChainsType handlerChainsType = getHandlerChainsType();
        sparseComposite.setHandlerChainsType(handlerChainsType);
        ServiceDelegate.setPortMetadata(sparseComposite);
        ClientMetadataHandlerChainTestSEIWithHC port = service.getPort(ClientMetadataHandlerChainTestSEIWithHC.class);
        BindingProvider bindingProvider = (BindingProvider) port;
        Binding binding = (Binding) bindingProvider.getBinding();
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

    public void testSEIHandlerChainOverrideOnService() {
        QName serviceQN = new QName(namespaceURI, svcLocalPart + uniqueService++);
       
        // The SEI has a HandlerChain annotation, but the sparse metadata should override it
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        HandlerChainsType handlerChainsType = getHandlerChainsType();
        sparseComposite.setHandlerChainsType(handlerChainsType);
        ServiceDelegate.setServiceMetadata(sparseComposite);
        Service service = Service.create(serviceQN);

        ClientMetadataHandlerChainTestSEIWithHC port = service.getPort(ClientMetadataHandlerChainTestSEIWithHC.class);
View Full Code Here

Examples of org.apache.axis2.jaxws.description.xml.handler.HandlerChainsType

    public void testCompositeOnServiceAndPort() {
        QName serviceQN = new QName(namespaceURI, svcLocalPart + uniqueService++);
       
        // Create a service with a composite specifying handlers
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
        HandlerChainsType handlerChainsType = getHandlerChainsType();
        sparseComposite.setHandlerChainsType(handlerChainsType);
        ServiceDelegate.setServiceMetadata(sparseComposite);
        Service service = Service.create(serviceQN);

        // Create a port with a composite specifying different handlers
        DescriptionBuilderComposite portComposite = new DescriptionBuilderComposite();
        HandlerChainsType portHandlerChainsType = getHandlerChainsType("ClientMetadataHandlerChainTest.xml");
        portComposite.setHandlerChainsType(portHandlerChainsType);
        ServiceDelegate.setPortMetadata(portComposite);
        ClientMetadataHandlerChainTestSEI port = service.getPort(ClientMetadataHandlerChainTestSEI.class);
        BindingProvider bindingProvider = (BindingProvider) port;
        Binding binding = (Binding) bindingProvider.getBinding();
View Full Code Here

Examples of org.apache.axis2.jaxws.javaee.HandlerChainsType

                        .newInstance(org.apache.axis2.jaxws.javaee.ObjectFactory.class);
                Unmarshaller u = jc.createUnmarshaller();
                URL handlerFileURL = clz.getResource(hcAnn.getFileName());
                JAXBElement<?> o = (JAXBElement<?>) u.unmarshal(handlerFileURL);

                HandlerChainsType handlerChainsType = (HandlerChainsType) o.getValue();

                if (null == handlerChainsType || handlerChainsType.getHandlerChain().size() == 0) {
                    throw new WebServiceException("Chain not specified");
                }
                //We expect only one HandlerChainType here
                hc = (HandlerChainType) handlerChainsType.getHandlerChain().iterator().next();
            } catch (Exception e) {
                e.printStackTrace();
                throw new WebServiceException("Chain not specified", e);
            }
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainsType

         
    /*
     * Set appropriate handlers for the port/service/bindings.
     */
    protected void initHandlers() throws Exception {       
        HandlerChainsType handlerChains = this.portInfo.getHandlers(HandlerChainsType.class);
        CXFHandlerResolver handlerResolver =
            new CXFHandlerResolver(getImplementorClass().getClassLoader(),
                                   getImplementorClass(),
                                   handlerChains,
                                   null);
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainsType

    /*
     * Gets the right handlers for the port/service/bindings and
     * performs injection.
     */
    protected void configureHandlers() throws Exception {       
        HandlerChainsType handlerChains = this.portInfo.getHandlers(HandlerChainsType.class);
        CXFHandlerResolver handlerResolver =
            new CXFHandlerResolver(this.implementor.getClass().getClassLoader(),
                                   this.implementor.getClass(),
                                   handlerChains,
                                   this.annotationProcessor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.