Package org.apache.cxf.jaxws.javaee

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


    /*
     * 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

         
    /*
     * 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

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

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

                if (null == handlerChainsType || handlerChainsType.getHandlerChain().size() == 0) {
                    throw new WebServiceException(BUNDLE
                            .getString("CHAIN_NOT_SPECIFIED_EXC"));
                }
               
                chain = new ArrayList<Handler>();
                for (HandlerChainType hc : handlerChainsType.getHandlerChain()) {
                    chain.addAll(buildHandlerChain(hc, clz.getClassLoader()));
                }

            } catch (Exception e) {
                throw new WebServiceException(BUNDLE.getString("CHAIN_NOT_SPECIFIED_EXC"), e);
View Full Code Here

                        .getFileName()).toString());
                }
               
                JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(handlerFileURL);

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

                if (null == handlerChainsType || handlerChainsType.getHandlerChain().size() == 0) {
                    throw new WebServiceException(BUNDLE
                            .getString("CHAIN_NOT_SPECIFIED_EXC"));
                }
               
                chain = new ArrayList<Handler>();
                for (HandlerChainType hc : handlerChainsType.getHandlerChain()) {
                    //Only add handlers if <port-name-pattern> is not presented or is matched.
                    //TODO: match the namespace, match the wild card etc. JSR-181, Appendix B.
                    if (hc.getPortNamePattern() != null && endpointName != null) {
                        String portNamePattern = hc.getPortNamePattern();
                        String localPart = portNamePattern.substring(portNamePattern.indexOf(':') + 1,
View Full Code Here

                        .newInstance(org.apache.cxf.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(BUNDLE
                            .getString("CHAIN_NOT_SPECIFIED_EXC"));
                }
                //We expect only one HandlerChainType here
                hc = (HandlerChainType) handlerChainsType.getHandlerChain().iterator().next();
            } catch (Exception e) {
                e.printStackTrace();
                throw new WebServiceException(BUNDLE.getString("CHAIN_NOT_SPECIFIED_EXC"), e);
            }
View Full Code Here

                        .getFileName()).toString());
                }
               
                JAXBElement<?> o = (JAXBElement<?>)u.unmarshal(handlerFileURL);

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

                if (null == handlerChainsType || handlerChainsType.getHandlerChain().size() == 0) {
                    throw new WebServiceException(BUNDLE
                            .getString("CHAIN_NOT_SPECIFIED_EXC"));
                }
               
                chain = new ArrayList<Handler>();
                for (HandlerChainType hc : handlerChainsType.getHandlerChain()) {
                    //Only add handlers if <port-name-pattern> is not presented or is matched.
                    //TODO: match the namespace, match the wild card etc. JSR-181, Appendix B.
                    if (hc.getPortNamePattern() != null && endpointName != null) {
                        String portNamePattern = hc.getPortNamePattern();
                        String localPart = portNamePattern.substring(portNamePattern.indexOf(':') + 1,
View Full Code Here

    /*
     * 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

         
    /*
     * 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

public class CXFHandlerResolverTest extends TestSupport {

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

TOP

Related Classes of org.apache.cxf.jaxws.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.