use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerEndpointMappingResponseHandlingRouteTest method testAction.
@Test
public void testAction() throws Exception {
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
webServiceTemplate.sendSourceAndReceiveToResult(getDefaultRequestSource(), new ActionCallback("http://www.webserviceX.NET/GetQuote"), result);
assertNotNull(result);
TestUtil.assertEqualsIgnoreNewLinesSymbol(expectedResponse, sw.toString());
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testWrongWSAddressingAction.
@Test(expected = WebServiceIOException.class)
public void testWrongWSAddressingAction() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new ActionCallback("http://this-is-a-wrong-ws-addressing-action"), TestUtil.NOOP_SOURCE_EXTRACTOR);
resultEndpointAction.assertIsSatisfied();
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingAction.
@Test
public void testWSAddressingAction() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new ActionCallback("http://www.stockquotes.edu/myUniqueAction"), TestUtil.NOOP_SOURCE_EXTRACTOR);
// here is localhost as to by default
resultEndpointAction.expectedMinimumMessageCount(1);
resultEndpointAction.assertIsSatisfied();
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingActionAndTo.
@Test
public void testWSAddressingActionAndTo() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://actionAndTo"), new Addressing10(), new URI("http://url4.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
resultEndpointActionAndTo.expectedMinimumMessageCount(1);
resultEndpointActionAndTo.assertIsSatisfied();
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingToResponseActions.
@Test
public void testWSAddressingToResponseActions() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://doesn-not-matter.com"), new Addressing10(), new URI("http://urlOutputAndFault2.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
resultOutputAndFault2.expectedMinimumMessageCount(1);
resultOutputAndFault2.assertIsSatisfied();
}
Aggregations