Search in sources :

Example 6 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingTo.

@Test
public void testWSAddressingTo() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://www.stockquotes.edu/does-not-matter"), new Addressing10(), new URI("http://myUniqueToUrl")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultEndpointTo.expectedMinimumMessageCount(1);
    resultEndpointTo.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Example 7 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerWSAEndpointMappingRouteTest method testWSAddressingToAndAction.

@Test
public void testWSAddressingToAndAction() throws Exception {
    StreamSource source = new StreamSource(new StringReader(xmlBody));
    webServiceTemplate.sendSourceAndReceive(source, new ActionCallback(new URI("http://toAndAction"), new Addressing10(), new URI("http://url3.to")), TestUtil.NOOP_SOURCE_EXTRACTOR);
    resultEndpointToAndAction.expectedMinimumMessageCount(1);
    resultEndpointToAndAction.assertIsSatisfied();
}
Also used : SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) StreamSource(javax.xml.transform.stream.StreamSource) StringReader(java.io.StringReader) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Example 8 with Addressing10

use of org.springframework.ws.soap.addressing.version.Addressing10 in project camel by apache.

the class ConsumerEndpointMappingResponseHandlingRouteTest method testTo.

@Test
public void testTo() throws Exception {
    StringWriter sw = new StringWriter();
    StreamResult result = new StreamResult(sw);
    webServiceTemplate.sendSourceAndReceiveToResult(getDefaultRequestSource(), new ActionCallback(new URI("http://action-does-not-matter-here"), new Addressing10(), new URI("http://url.to")), result);
    assertNotNull(result);
    TestUtil.assertEqualsIgnoreNewLinesSymbol(expectedResponse, sw.toString());
}
Also used : StringWriter(java.io.StringWriter) StreamResult(javax.xml.transform.stream.StreamResult) SoapActionCallback(org.springframework.ws.soap.client.core.SoapActionCallback) ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) Test(org.junit.Test)

Aggregations

URI (java.net.URI)8 ActionCallback (org.springframework.ws.soap.addressing.client.ActionCallback)8 Addressing10 (org.springframework.ws.soap.addressing.version.Addressing10)8 Test (org.junit.Test)7 SoapActionCallback (org.springframework.ws.soap.client.core.SoapActionCallback)7 StringReader (java.io.StringReader)6 StreamSource (javax.xml.transform.stream.StreamSource)6 StringWriter (java.io.StringWriter)1 StreamResult (javax.xml.transform.stream.StreamResult)1 EndpointReference (org.springframework.ws.soap.addressing.core.EndpointReference)1