use of javax.xml.transform.stream.StreamSource in project camel by apache.
the class ConsumerExceptionPropagationRouteTest method consumeWebserviceAndTestForSoapFault.
@Test
public void consumeWebserviceAndTestForSoapFault() throws Exception {
StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuote));
mockClient.sendRequest(withPayload(source)).andExpect(serverOrReceiverFault());
}
use of javax.xml.transform.stream.StreamSource 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 javax.xml.transform.stream.StreamSource 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 javax.xml.transform.stream.StreamSource 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 javax.xml.transform.stream.StreamSource 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();
}
Aggregations