use of org.springframework.ws.soap.client.core.SoapActionCallback in project camel by apache.
the class ConsumerEndpointMappingRouteTest method testSoapAction.
@Test
public void testSoapAction() throws Exception {
webServiceTemplate.sendSourceAndReceive(getDefaultXmlRequestSource(), new SoapActionCallback("http://www.stockquotes.edu/GetQuote"), NOOP_SOURCE_EXTRACTOR);
resultEndpointSoapAction.expectedMinimumMessageCount(1);
resultEndpointSoapAction.assertIsSatisfied();
}
use of org.springframework.ws.soap.client.core.SoapActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testClassicalSoapHttpHeaderInterference.
@Test
public void testClassicalSoapHttpHeaderInterference() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://www.stockquotes.edu/soapHttpHeaderAction"), TestUtil.NOOP_SOURCE_EXTRACTOR);
resultSoapAction.expectedMinimumMessageCount(1);
resultSoapAction.assertIsSatisfied();
}
use of org.springframework.ws.soap.client.core.SoapActionCallback in project webservices-axiom by apache.
the class SoapActionTest method runTest.
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document requestDocument = documentBuilder.newDocument();
Element request = requestDocument.createElementNS("urn:test", "p:Echo");
request.setTextContent("Hello");
Document responseDocument = documentBuilder.newDocument();
context.getBean(WebServiceTemplate.class).sendSourceAndReceiveToResult(new DOMSource(request), new SoapActionCallback("http://www.example.com/echo"), new DOMResult(responseDocument));
Element response = responseDocument.getDocumentElement();
assertEquals("urn:test", response.getNamespaceURI());
assertEquals("Echo", response.getLocalName());
assertEquals("Hello", response.getTextContent());
}
use of org.springframework.ws.soap.client.core.SoapActionCallback in project camel by apache.
the class ConsumerEndpointMappingResponseHandlingRouteTest method testSoapAction.
@Test
public void testSoapAction() throws Exception {
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
webServiceTemplate.sendSourceAndReceiveToResult(getDefaultRequestSource(), new SoapActionCallback("http://www.webserviceX.NET/GetQuote"), result);
assertNotNull(result);
TestUtil.assertEqualsIgnoreNewLinesSymbol(expectedResponse, sw.toString());
}
use of org.springframework.ws.soap.client.core.SoapActionCallback in project camel by apache.
the class ConsumerEndpointMappingRouteTest method testWrongSoapAction.
@Test(expected = WebServiceIOException.class)
public void testWrongSoapAction() throws Exception {
webServiceTemplate.sendSourceAndReceive(getDefaultXmlRequestSource(), new SoapActionCallback("http://this-is-a-wrong-soap-action"), NOOP_SOURCE_EXTRACTOR);
resultEndpointSoapAction.assertIsNotSatisfied();
}
Aggregations