Examples of HandlerChainsType


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

        EndpointDescription desc = AxisServiceGenerator.getEndpointDescription(this.service);
        if (desc == null) {
            this.binding = new BindingImpl("");
        } else {
            String xml = this.portInfo.getHandlersAsXML();
            HandlerChainsType handlerChains = null;
            if (xml != null) {
                ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
                handlerChains = DescriptionUtils.loadHandlerChains(in);
                desc.setHandlerChain(handlerChains);
            }
View Full Code Here

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

        /*
         * TODO: do a better job checking that the return value matches up
         * with the PortInfo object before we add it to the chain.
         */
       
        HandlerChainsType handlerCT = serviceDesc.getHandlerChain()
        // if there's a handlerChain on the serviceDesc, it means the WSDL defined an import for a HandlerChain.
        // the spec indicates that if a handlerchain also appears on the SEI on the client.
        EndpointDescription ed = null;
        if(portinfo !=null){
             ed = serviceDesc.getEndpointDescription(portinfo.getPortName());
        }
       
        if (ed != null) {
            HandlerChainsType handlerCT_fromEndpointDesc = ed.getHandlerChain();
            if (handlerCT == null) {
                handlerCT = handlerCT_fromEndpointDesc;
            }
        }

View Full Code Here

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

        // If there is a HandlerChainsType in the sparse composite for this ServiceDelegate
        // (i.e. this sparseCompositeKey), then return that.
        if (sparseCompositeKey != null) {
            sparseComposite = composite.getSparseComposite(sparseCompositeKey);
            if (sparseComposite != null && sparseComposite.getHandlerChainsType() != null) {
                HandlerChainsType hct = sparseComposite.getHandlerChainsType();
                return hct;
            }
        }
       
        // If there is no HandlerChainsType in the composite, then read in the file specified
View Full Code Here

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

            // sparse composite information specified for this service delegate.  Sparse composite
            // information is how Deployment Descriptor information is specified, and that
            // overrides the annotations as described in the long-winded comment above.
            // -- THEN --
            // Use this handler chains information
            HandlerChainsType hct_includingComposite = ed.getHandlerChain(serviceDelegateKey);
            HandlerChainsType hct_noComposite = ed.getHandlerChain();
            if (handlerChainsType == null || (hct_includingComposite != hct_noComposite)) {
                handlerChainsType = hct_includingComposite;
            }
        } else {
            // There is no EndpointDescription that matches the portInfo specified so
View Full Code Here

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

        if (!JAVA_EE_NS.equals(el.getNamespaceURI()) ||
            !"handler-chains".equals(el.getLocalName())) {
                throw new WebServiceException("Unexpected element. Expected handler-chains element");
        }

        HandlerChainsType handlerChains = new HandlerChainsType();
        Node node = el.getFirstChild();
        while (node != null) {
            if (node instanceof Element) {
                el = (Element)node;
                if (!JAVA_EE_NS.equals(el.getNamespaceURI()) ||
                    !el.getLocalName().equals("handler-chain")) {               
                    throw new WebServiceException("Unexpected element. Expected handler-chain element.");
                }
                handlerChains.getHandlerChain().add(processHandlerChainElement(el));
            }
            node = node.getNextSibling();
        }

        return handlerChains;
View Full Code Here

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

        EndpointDescription desc = AxisServiceGenerator.getEndpointDescription(this.service);
        if (desc == null) {
            this.binding = new BindingImpl("");
        } else {
            String xml = this.portInfo.getHandlersAsXML();
            HandlerChainsType handlerChains = null;
            if (xml != null) {
                ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes("UTF-8"));
                handlerChains = DescriptionUtils.loadHandlerChains(in);
                desc.setHandlerChain(handlerChains);
            }
View Full Code Here

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

        HashMap<String, DescriptionBuilderComposite> dbcMap = converter.produceDBC();
        DescriptionBuilderComposite dbc = dbcMap.get(AnnotatedService.class.getName());
        assertNotNull(dbc);
        InputStream is = getXMLFileStream();
        assertNotNull(is);
        HandlerChainsType hct = DescriptionUtils.loadHandlerChains(is, this.getClass().getClassLoader());
        dbc.setHandlerChainsType(hct);
        List<ServiceDescription> sdList = DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(dbcMap, null);
        assertNotNull(sdList);
        assertTrue(sdList.size() > 0);
        ServiceDescription sd = sdList.get(0);
View Full Code Here

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

    public void testHandlersOnService() {
        QName serviceQName = new QName(namespaceURI, svcLocalPart);
        // Create a composite with a JAXB Handler Config
        DescriptionBuilderComposite composite = new DescriptionBuilderComposite();

        HandlerChainsType handlerChainsType = getHandlerChainsType();
        composite.setHandlerChainsType(handlerChainsType);
        Object compositeKey = "CompositeKey";
        ServiceDescription svcDesc =
            DescriptionFactory.createServiceDescription(null, serviceQName,
                                       ClientDBCSupportHandlersService.class,
View Full Code Here

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

        QName serviceQName = new QName(namespaceURI, svcLocalPart2);
        QName portQName = new QName(namespaceURI, portLocalPart);

        DescriptionBuilderComposite composite = new DescriptionBuilderComposite();

        HandlerChainsType handlerChainsType = getHandlerChainsType();
        composite.setHandlerChainsType(handlerChainsType);
        Object compositeKey = "CompositeKey";

        ServiceDescription svcDesc =
            DescriptionFactory.createServiceDescription(null, serviceQName,
View Full Code Here

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

    }

    private HandlerChainsType getHandlerChainsType() {
        InputStream is = getXMLFileStream();
        assertNotNull(is);
        HandlerChainsType returnHCT = DescriptionUtils.loadHandlerChains(is, this.getClass().getClassLoader());
        assertNotNull(returnHCT);
        return returnHCT;
    }
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.