use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class CamelDirectSenderTest method endpointSender.
@Test
public void endpointSender() throws Exception {
ActionCallback requestCallback = channelIn("http://sender-default.com");
webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
Assertions.assertThat(channelOut().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class CamelDirectSenderTest method customSender.
@Test
public void customSender() throws Exception {
ActionCallback requestCallback = channelIn("http://sender-custom.com");
webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
Assertions.assertThat(customChannelParams().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project webservices-axiom by apache.
the class WSAddressingDOMTest method runTest.
@Override
protected void runTest() throws Throwable {
DocumentBuilder documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document requestDocument = documentBuilder.newDocument();
Element request = requestDocument.createElementNS("urn:test", "p:testRequest");
request.setTextContent("test");
Document responseDocument = documentBuilder.newDocument();
context.getBean(WebServiceTemplate.class).sendSourceAndReceiveToResult(new DOMSource(request), new ActionCallback(EchoEndpoint.ACTION), new DOMResult(responseDocument));
Element response = responseDocument.getDocumentElement();
assertEquals("urn:test", response.getNamespaceURI());
assertEquals("testRequest", response.getLocalName());
assertEquals("test", response.getTextContent());
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class AbstractConsumerTests method headerAction4output.
@Test
@Ignore(value = "Not implemented yet")
public void headerAction4output() throws Exception {
ActionCallback requestCallback = channelIn("http://headerOnly-ok.com");
webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
Assertions.assertThat(channelOut().getAction()).isEqualTo(new URI("http://outputHeader.com"));
}
use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.
the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingResolveToMoreSpecif.
@Test
public void testWSAddressingResolveToMoreSpecif() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlBody));
webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://action1"), new Addressing10(), new URI("http://url1.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
resultEndpointToMoreSpecific.expectedMinimumMessageCount(1);
resultEndpointToMoreSpecific.assertIsSatisfied();
resultEndpointActionMoreSpecific.expectedMinimumMessageCount(0);
resultEndpointActionMoreSpecific.assertIsSatisfied();
}
Aggregations