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

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


        if (!Boolean.TRUE.equals(binding.getProperty(DATABINDING_DISABLED))) {
            sb.getInInterceptors().add(new AttachmentInInterceptor());
            sb.getInInterceptors().add(new StaxInInterceptor());
            sb.getInInterceptors().add(new SoapActionInInterceptor());
           
            sb.getOutInterceptors().add(new SoapActionOutInterceptor());
            sb.getOutInterceptors().add(new AttachmentOutInterceptor());
            sb.getOutInterceptors().add(new StaxOutInterceptor());
            sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());

            if (SoapConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) {
View Full Code Here


public class SoapActionInterceptorTest extends Assert {

   
    @Test
    public void testSoapAction() throws Exception {
        SoapActionOutInterceptor i = new SoapActionOutInterceptor();
       
        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;
        assertEquals(Soap11.getInstance(), soapMessage.getVersion());
        (new SoapActionOutInterceptor()).handleMessage(soapMessage);
        Map<String, List<String>> reqHeaders = CastUtils.cast((Map)soapMessage.get(Message.PROTOCOL_HEADERS));
        assertNotNull(reqHeaders);
        assertEquals("\"\"", reqHeaders.get("SOAPAction").get(0));

        sb.setSoapVersion(Soap12.getInstance());
        soapMessage.clear();
        soapMessage = (SoapMessage) sb.createMessage(soapMessage);
        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

        if (!Boolean.TRUE.equals(binding.getProperty(DATABINDING_DISABLED))) {
            sb.getInInterceptors().add(new AttachmentInInterceptor());
            sb.getInInterceptors().add(new StaxInInterceptor());
            sb.getInInterceptors().add(new SoapActionInInterceptor());
           
            sb.getOutInterceptors().add(new SoapActionOutInterceptor());
            sb.getOutInterceptors().add(new AttachmentOutInterceptor());
            sb.getOutInterceptors().add(new StaxOutInterceptor());
            sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());

            if (SoapConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) {
View Full Code Here

        getService().getInInterceptors().add(new StaxInInterceptor());
        getService().getInInterceptors().add(new SoapActionInInterceptor());

        getService().getOutInterceptors().add(new DataOutInterceptor());
        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());
View Full Code Here

        if (!Boolean.TRUE.equals(binding.getProperty(DATABINDING_DISABLED))) {
            sb.getInInterceptors().add(new AttachmentInInterceptor());
            sb.getInInterceptors().add(new StaxInInterceptor());
            sb.getInInterceptors().add(new SoapActionInInterceptor());
           
            sb.getOutInterceptors().add(new SoapActionOutInterceptor());
            sb.getOutInterceptors().add(new AttachmentOutInterceptor());
            sb.getOutInterceptors().add(new StaxOutInterceptor());
            sb.getOutInterceptors().add(new SoapHeaderOutFilterInterceptor());

            if (SoapConstants.BINDING_STYLE_RPC.equalsIgnoreCase(bindingStyle)) {
View Full Code Here

TOP

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

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.