Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.WrappedInInterceptor


import org.apache.cxf.service.model.BindingOperationInfo;

public class WrappedInInterceptorTest extends TestBase {

    public void testInterceptorInbound() throws Exception {
        WrappedInInterceptor interceptor = new WrappedInInterceptor();

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

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));
        BindingOperationInfo op = (BindingOperationInfo)message.getExchange().get(BindingOperationInfo.class
                                                                                      .getName());
        assertNotNull(op);
View Full Code Here


        assertEquals("TestSOAPInputPMessage", gm.getRequestType());
    }

    public void testInterceptorOutbound() throws Exception {
        WrappedInInterceptor interceptor = new WrappedInInterceptor();

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

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

        List<?> objs = message.getContent(List.class);
        assertTrue(objs != null && objs.size() > 0);
View Full Code Here

                        && SoapConstants.PARAMETER_STYLE_BARE.equalsIgnoreCase(parameterStyle)) {
            sb.getInInterceptors().add(new BareInInterceptor());
            sb.getInInterceptors().add(new SoapInPostInterceptor());
            sb.getOutInterceptors().add(new BareOutInterceptor());
        } else {
            sb.getInInterceptors().add(new WrappedInInterceptor());
            sb.getOutInterceptors().add(new WrappedOutInterceptor());
            sb.getOutInterceptors().add(new BareOutInterceptor());
        }
       
        sb.getInInterceptors().add(new URIMappingInterceptor());
View Full Code Here

public class WrappedInInterceptorTest extends TestBase {
   
    @Test
    public void testInterceptorInbound() throws Exception {
        WrappedInInterceptor interceptor = new WrappedInInterceptor();

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

        interceptor.handleMessage(message);

        assertNull(message.getContent(Exception.class));
        BindingOperationInfo op = (BindingOperationInfo)message.getExchange().get(BindingOperationInfo.class
                                                                                      .getName());
        assertNotNull(op);
View Full Code Here

        assertEquals("TestSOAPInputPMessage", gm.getRequestType());
    }

    @Test
    public void testInterceptorOutbound() throws Exception {
        WrappedInInterceptor interceptor = new WrappedInInterceptor();

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

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

        List<?> objs = message.getContent(List.class);
        assertTrue(objs != null && objs.size() > 0);
View Full Code Here

TOP

Related Classes of org.apache.cxf.interceptor.WrappedInInterceptor

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.