Package org.apache.cxf.binding.soap.interceptor

Examples of org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor


        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus(), version));
        sb.getInInterceptors().add(new StartBodyInterceptor());
        sb.getInInterceptors().add(new CheckFaultInterceptor());
        sb.getInInterceptors().add(new MustUnderstandInterceptor());
        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);

        if (version.getVersion() == 1.1) {
View Full Code Here


        sb.getInInterceptors().add(new SoapHeaderInterceptor());

        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus(), version));
        sb.getInInterceptors().add(new CheckFaultInterceptor());
        sb.getInInterceptors().add(new MustUnderstandInterceptor());
        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

        // REVISIT: The phase interceptor chain seems to freak out if this added
        // first. Not sure what the deal is at the moment, I suspect the
View Full Code Here

        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus(), version));
        sb.getInInterceptors().add(new StartBodyInterceptor());
        sb.getInInterceptors().add(new CheckFaultInterceptor());
        sb.getInInterceptors().add(new MustUnderstandInterceptor());
        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);

        if (version.getVersion() == 1.1) {
View Full Code Here

        getService().getOutInterceptors().add(new SoapActionOutInterceptor());
        getService().getOutInterceptors().add(new AttachmentOutInterceptor());
        getService().getOutInterceptors().add(new StaxOutInterceptor());
        getService().getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());

        getService().getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        getService().getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        getService().getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
    }
View Full Code Here

            sb.getInInterceptors().add(new SoapHeaderInterceptor());

            sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus()));
            sb.getInInterceptors().add(new CheckFaultInterceptor());
            sb.getInInterceptors().add(new MustUnderstandInterceptor());
            sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
            sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
            sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

            // REVISIT: The phase interceptor chain seems to freak out if this added
            // first. Not sure what the deal is at the moment, I suspect the
View Full Code Here

public class SoapActionInterceptorTest extends Assert {

   
    @Test
    public void testSoapAction() throws Exception {
        SoapPreProtocolOutInterceptor i = new SoapPreProtocolOutInterceptor();
       
        Message message = new MessageImpl();
        message.setExchange(new ExchangeImpl());
        message.getExchange().setOutMessage(message);
        SoapBinding sb = new SoapBinding(null);
        message = sb.createMessage(message);
        assertNotNull(message);
        assertTrue(message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        soapMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        assertEquals(Soap11.getInstance(), soapMessage.getVersion());
        (new SoapPreProtocolOutInterceptor()).handleMessage(soapMessage);
        Map<String, List<String>> reqHeaders = CastUtils.cast((Map)soapMessage.get(Message.PROTOCOL_HEADERS));
        assertNotNull(reqHeaders);
        assertEquals("\"\"", reqHeaders.get(SoapConstants.SOAP_ACTION).get(0));

        sb.setSoapVersion(Soap12.getInstance());
        soapMessage.clear();
        soapMessage = (SoapMessage) sb.createMessage(soapMessage);
        soapMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        i.handleMessage(soapMessage);
        String ct = (String) message.get(Message.CONTENT_TYPE);
        assertEquals("application/soap+xml", ct);
       
        BindingOperationInfo bop = createBindingOperation();
        message.getExchange().put(BindingOperationInfo.class, bop);
        SoapOperationInfo soapInfo = new SoapOperationInfo();
        soapInfo.setAction("foo");
        bop.addExtensor(soapInfo);
       
        i.handleMessage(soapMessage);
        ct = (String) message.get(Message.CONTENT_TYPE);
        assertEquals("application/soap+xml; action=\"foo\"", ct);
    }
View Full Code Here

public class SoapActionInterceptorTest extends Assert {

   
    @Test
    public void testSoapAction() throws Exception {
        SoapPreProtocolOutInterceptor i = new SoapPreProtocolOutInterceptor();
       
        Message message = new MessageImpl();
        message.setExchange(new ExchangeImpl());
        message.getExchange().setOutMessage(message);
        SoapBinding sb = new SoapBinding(null);
        message = sb.createMessage(message);
        assertNotNull(message);
        assertTrue(message instanceof SoapMessage);
        SoapMessage soapMessage = (SoapMessage) message;
        soapMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        assertEquals(Soap11.getInstance(), soapMessage.getVersion());
        (new SoapPreProtocolOutInterceptor()).handleMessage(soapMessage);
        Map<String, List<String>> reqHeaders  
            = CastUtils.cast((Map<?, ?>)soapMessage.get(Message.PROTOCOL_HEADERS));
        assertNotNull(reqHeaders);
        assertEquals("\"\"", reqHeaders.get(SoapBindingConstants.SOAP_ACTION).get(0));

        sb.setSoapVersion(Soap12.getInstance());
        soapMessage.clear();
        soapMessage = (SoapMessage) sb.createMessage(soapMessage);
        soapMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        i.handleMessage(soapMessage);
        String ct = (String) soapMessage.get(Message.CONTENT_TYPE);
        assertEquals("application/soap+xml", ct);
       
        BindingOperationInfo bop = createBindingOperation();
        soapMessage.getExchange().put(BindingOperationInfo.class, bop);
        SoapOperationInfo soapInfo = new SoapOperationInfo();
        soapInfo.setAction("foo");
        bop.addExtensor(soapInfo);
       
        i.handleMessage(soapMessage);
        ct = (String) soapMessage.get(Message.CONTENT_TYPE);
        assertEquals("application/soap+xml; action=\"foo\"", ct);
    }
View Full Code Here

        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus(), version));
        sb.getInInterceptors().add(new StartBodyInterceptor());
        sb.getInInterceptors().add(new CheckFaultInterceptor());
        sb.getInInterceptors().add(new MustUnderstandInterceptor());
        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);

        // REVISIT: The phase interceptor chain seems to freak out if this added
View Full Code Here

            sb.getInInterceptors().add(new SoapHeaderInterceptor());

            sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus()));
            sb.getInInterceptors().add(new CheckFaultInterceptor());
            sb.getInInterceptors().add(new MustUnderstandInterceptor());
            sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
            sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
            sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));

            // REVISIT: The phase interceptor chain seems to freak out if this added
            // first. Not sure what the deal is at the moment, I suspect the
View Full Code Here

        sb.getInInterceptors().add(new ReadHeadersInterceptor(getBus(), version));
        sb.getInInterceptors().add(new StartBodyInterceptor());
        sb.getInInterceptors().add(new CheckFaultInterceptor());
        sb.getInInterceptors().add(new MustUnderstandInterceptor());
        sb.getOutInterceptors().add(new SoapPreProtocolOutInterceptor());
        sb.getOutInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(new SoapOutInterceptor(getBus()));
        sb.getOutFaultInterceptors().add(SoapHeaderOutFilterInterceptor.INSTANCE);

        // REVISIT: The phase interceptor chain seems to freak out if this added
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor

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.