Search in sources :

Example 6 with SoapFaultClientException

use of org.springframework.ws.soap.client.SoapFaultClientException 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 7 with SoapFaultClientException

use of org.springframework.ws.soap.client.SoapFaultClientException 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)

Aggregations

SoapFaultClientException (org.springframework.ws.soap.client.SoapFaultClientException)7 Test (org.junit.Test)6 ActionCallback (org.springframework.ws.soap.addressing.client.ActionCallback)6 URI (java.net.URI)4 Ignore (org.junit.Ignore)2 Locale (java.util.Locale)1