Package org.apache.cxf.wsdl.interceptors

Examples of org.apache.cxf.wsdl.interceptors.BareInInterceptor


                bareIn = true;
            }
     
        }
        if (!bareIn) {
            chain.add(new BareInInterceptor());
            LOG.fine("Added BareInInterceptor to chain.");
        }
    }
View Full Code Here


        if (message.getExchange().get(BindingOperationInfo.class) == null) {
            operation = getOperation(message, new QName(xmlReader.getNamespaceURI(), opName));
            if (operation == null) {
                // it's doc-lit-bare
                new BareInInterceptor().handleMessage(message);
                return;
            } else {
                setMessage(message, operation);
            }
        } else {
View Full Code Here

        binding.getInFaultInterceptors().add(new CorbaStreamFaultInInterceptor());
        binding.getOutFaultInterceptors().add(new CorbaStreamFaultOutInterceptor());
        binding.getOutInterceptors().add(new BareOutInterceptor());
        binding.getOutInterceptors().add(new CorbaStreamOutInterceptor());
        binding.getInInterceptors().add(new BareInInterceptor());
        binding.getInInterceptors().add(new CorbaStreamInInterceptor());
        binding.setBindingInfo(bindingInfo);
        return binding;
    }
View Full Code Here

                bareIn = true;
            }
     
        }
        if (!bareIn) {
            chain.add(new BareInInterceptor());
            LOG.fine("Added BareInInterceptor to chain.");
        }
    }
View Full Code Here

        if (message.getExchange().get(BindingOperationInfo.class) == null) {
            operation = getOperation(message, new QName(xmlReader.getNamespaceURI(), opName));
            if (operation == null) {
                // it's doc-lit-bare
                new BareInInterceptor().handleMessage(message);
                return;
            } else {
                setMessage(message, operation);
            }
        } else {
View Full Code Here

   
    @Test
    public void testInterceptorInbound() throws Exception {
        setUpUsingHelloWorld();

        BareInInterceptor interceptor = new BareInInterceptor();       
        message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
            .createXMLStreamReader(getTestStream(getClass(), "resources/GreetMeDocLiteralReq.xml")));

        message.put(Message.INBOUND_MESSAGE, Message.INBOUND_MESSAGE);

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));

        List<?> parameters = message.getContent(List.class);
        assertEquals(1, parameters.size());
View Full Code Here

    @Test
    public void testInterceptorInbound1() throws Exception {
        setUpUsingDocLit();

        BareInInterceptor interceptor = new BareInInterceptor();       
        message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
            .createXMLStreamReader(getTestStream(getClass(), "resources/sayHiDocLitBareReq.xml")));

        message.put(Message.INBOUND_MESSAGE, Message.INBOUND_MESSAGE);

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));

        List<?> parameters = message.getContent(List.class);
        assertEquals(1, parameters.size());
View Full Code Here

   
    @Test
    public void testInterceptorInboundBareNoParameter() throws Exception {
        setUpUsingDocLit();
       
        BareInInterceptor interceptor = new BareInInterceptor();       
        message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
            .createXMLStreamReader(getTestStream(getClass(), "resources/bareNoParamDocLitBareReq.xml")));
       
        XMLStreamReader reader = message.getContent(XMLStreamReader.class);
        // skip to the end element of soap body, so that we can serve an empty request to
        // interceptor
        StaxUtils.skipToStartOfElement(reader);
        StaxUtils.nextEvent(reader);

        message.put(Message.INBOUND_MESSAGE, Message.INBOUND_MESSAGE);

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));

        List<?> parameters = message.getContent(List.class);
        assertNull(parameters);
View Full Code Here

   
    @Test
    public void testInterceptorOutbound() throws Exception {
        setUpUsingHelloWorld();

        BareInInterceptor interceptor = new BareInInterceptor();

        message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
            .createXMLStreamReader(getTestStream(getClass(), "resources/GreetMeDocLiteralResp.xml")));
        message.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        interceptor.handleMessage(message);

        List<?> parameters = message.getContent(List.class);
        assertEquals(1, parameters.size());

        Object obj = parameters.get(0);
View Full Code Here

   
    @Test
    public void testInterceptorInbound() throws Exception {
        setUpUsingHelloWorld();

        BareInInterceptor interceptor = new BareInInterceptor();       
        message.setContent(XMLStreamReader.class, XMLInputFactory.newInstance()
            .createXMLStreamReader(getTestStream(getClass(), "resources/GreetMeDocLiteralReq.xml")));

        message.put(Message.INBOUND_MESSAGE, Message.INBOUND_MESSAGE);

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));

        List<?> parameters = message.getContent(List.class);
        assertEquals(1, parameters.size());
View Full Code Here

TOP

Related Classes of org.apache.cxf.wsdl.interceptors.BareInInterceptor

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.