Search in sources :

Example 26 with ActionCallback

use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.

the class AbstractConsumerTests method onlyCustomOutputSpecified4output.

@Test
public void onlyCustomOutputSpecified4output() throws Exception {
    ActionCallback requestCallback = channelIn("http://uriOutputOnly-ok.com/");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(channelOut().getAction()).isEqualTo(new URI("http://customURIOutputAction"));
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) URI(java.net.URI) Test(org.junit.Test)

Example 27 with ActionCallback

use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.

the class AbstractConsumerTests method defaultAction4fault.

@Test
public void defaultAction4fault() throws Exception {
    ActionCallback requestCallback = channelIn("http://default-fault.com/");
    try {
        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    } catch (SoapFaultClientException e) {
    // ok - cause fault response
    }
    Assertions.assertThat(channelOut().getAction()).isEqualTo(getDefaultResponseAction());
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) SoapFaultClientException(org.springframework.ws.soap.client.SoapFaultClientException) Test(org.junit.Test)

Example 28 with ActionCallback

use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.

the class AbstractConsumerTests method defaultAction4ouput.

@Test
public void defaultAction4ouput() throws Exception {
    ActionCallback requestCallback = channelIn("http://default-ok.com/");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(channelOut().getAction()).isEqualTo(getDefaultResponseAction());
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Test(org.junit.Test)

Example 29 with ActionCallback

use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.

the class AbstractConsumerTests method headerAction4fault.

@Test
@Ignore(value = "Not implemented yet")
public void headerAction4fault() throws Exception {
    ActionCallback requestCallback = channelIn("http://headerOnly-fault.com");
    try {
        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    } catch (SoapFaultClientException e) {
    // ok - cause fault response
    }
    Assertions.assertThat(channelOut().getAction()).isEqualTo(new URI("http://faultHeader.com"));
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) SoapFaultClientException(org.springframework.ws.soap.client.SoapFaultClientException) URI(java.net.URI) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 30 with ActionCallback

use of org.springframework.ws.soap.addressing.client.ActionCallback in project camel by apache.

the class AbstractConsumerTests method overrideHeaderAction4output.

@Test
@Ignore(value = "Not implemented yet")
public void overrideHeaderAction4output() throws Exception {
    ActionCallback requestCallback = channelIn("http://override-ok.com");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(channelOut().getAction()).isEqualTo(new URI("http://outputHeader.com"));
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) URI(java.net.URI) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

ActionCallback (org.springframework.ws.soap.addressing.client.ActionCallback)32 Test (org.junit.Test)29 URI (java.net.URI)21 SoapActionCallback (org.springframework.ws.soap.client.core.SoapActionCallback)11 StringReader (java.io.StringReader)9 StreamSource (javax.xml.transform.stream.StreamSource)9 Addressing10 (org.springframework.ws.soap.addressing.version.Addressing10)8 SoapFaultClientException (org.springframework.ws.soap.client.SoapFaultClientException)6 Ignore (org.junit.Ignore)4 StringWriter (java.io.StringWriter)2 StreamResult (javax.xml.transform.stream.StreamResult)2 EndpointReference (org.springframework.ws.soap.addressing.core.EndpointReference)2 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 DOMResult (javax.xml.transform.dom.DOMResult)1 DOMSource (javax.xml.transform.dom.DOMSource)1 WebServiceTemplate (org.springframework.ws.client.core.WebServiceTemplate)1 Document (org.w3c.dom.Document)1 Element (org.w3c.dom.Element)1