Package org.springframework.ws.soap.client.core

Examples of org.springframework.ws.soap.client.core.SoapActionCallback


        public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException {
            // Add SoapAction to webservice request. Note that exchange header
            // takes precedence over endpoint option
            String soapAction = soapActionHeader != null ? soapActionHeader : endpoint.getConfiguration().getSoapAction();
            if (soapAction != null) {
                new SoapActionCallback(soapAction).doWithMessage(message);
            }
            // Add WS-Addressing Action to webservice request (the WS-Addressing
            // 'to' header will default to the URL of the connection).
            // Note that exchange header takes precedence over endpoint option
            URI wsAddressingAction = wsAddressingActionHeader != null ? wsAddressingActionHeader : endpoint.getConfiguration().getWsAddressingAction();
View Full Code Here


    }

    @Test
    public void testSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://www.stockquotes.edu/GetQuote"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.expectedMinimumMessageCount(1);
        resultEndpointSoapAction.assertIsSatisfied();
    }
View Full Code Here

        if (isJava15()) {
            // does not work on JDK 1.5 due net.javacrumbs.spring-ws-test is not JDK 1.5 compatible
            throw new WebServiceIOException("Forced by JDK 1.5");
        }
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://this-is-a-wrong-soap-action"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.assertIsNotSatisfied();
    }
View Full Code Here

    @Test
    public void testSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        StringWriter sw = new StringWriter();
        StreamResult result = new StreamResult(sw);
        webServiceTemplate.sendSourceAndReceiveToResult(source, new SoapActionCallback("http://www.webserviceX.NET/GetQuote"), result);
        assertNotNull(result);
        assertEquals(expectedResponse, sw.toString());
    }
View Full Code Here

        public void doWithMessage(WebServiceMessage message) throws IOException, TransformerException {
            // Add SoapAction to webservice request. Note that exchange header
            // takes precedence over endpoint option
            String soapAction = soapActionHeader != null ? soapActionHeader : configuration.getSoapAction();
            if (soapAction != null) {
                new SoapActionCallback(soapAction).doWithMessage(message);
            }
            // Add WS-Addressing Action to webservice request (the WS-Addressing
            // 'to' header will default to the URL of the connection).
            // Note that exchange header takes precedence over endpoint option
            URI wsAddressingAction = wsAddressingActionHeader != null ? wsAddressingActionHeader : configuration.getWsAddressingAction();
View Full Code Here

    }

    @Test
    public void testSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://www.stockquotes.edu/GetQuote"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.expectedMinimumMessageCount(1);
        resultEndpointSoapAction.assertIsSatisfied();
    }
View Full Code Here

    }

    @Test(expected = WebServiceIOException.class)
    public void testWrongSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://this-is-a-wrong-soap-action"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.assertIsNotSatisfied();
    }
View Full Code Here

    @Test
    public void testSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        StringWriter sw = new StringWriter();
        StreamResult result = new StreamResult(sw);
        webServiceTemplate.sendSourceAndReceiveToResult(source, new SoapActionCallback("http://www.webserviceX.NET/GetQuote"), result);
        assertNotNull(result);
        assertEquals(expectedResponse, toUnixLineEndings(sw.toString()));
    }
View Full Code Here

    }

    @Test
    public void testSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://www.stockquotes.edu/GetQuote"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.expectedMinimumMessageCount(1);
        resultEndpointSoapAction.assertIsSatisfied();
    }
View Full Code Here

    }

    @Test(expected = WebServiceIOException.class)
    public void testWrongSoapAction() throws Exception {
        StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
        webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://this-is-a-wrong-soap-action"), NOOP_SOURCE_EXTRACTOR);
        resultEndpointSoapAction.assertIsNotSatisfied();
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.soap.client.core.SoapActionCallback

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.