Examples of BareInInterceptor


Examples of org.apache.cxf.interceptor.BareInInterceptor

   
    @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 = (XMLStreamReader)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

Examples of org.apache.cxf.interceptor.BareInInterceptor

   
    @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

Examples of org.apache.cxf.interceptor.BareInInterceptor

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

Examples of org.apache.cxf.interceptor.BareInInterceptor

        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

Examples of org.apache.cxf.interceptor.BareInInterceptor

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

Examples of org.apache.cxf.interceptor.BareInInterceptor

        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

Examples of org.apache.cxf.interceptor.BareInInterceptor

import org.apache.hello_world_soap_http.types.GreetMeResponse;

public class BareInInterceptorTest extends TestBase {

    public void testInterceptorInbound() throws Exception {
        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

Examples of org.apache.cxf.interceptor.BareInInterceptor

        GreetMe greet = (GreetMe)obj;
        assertEquals("TestSOAPInputPMessage", greet.getRequestType());       
    }

    public void testInterceptorOutbound() throws Exception {
        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

Examples of org.apache.cxf.interceptor.BareInInterceptor

        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

Examples of org.apache.cxf.interceptor.BareInInterceptor

        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
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.