Search in sources :

Example 11 with ActionCallback

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

the class AbstractConsumerTests method onlyCustomFaultSpecified4output.

@Test
public void onlyCustomFaultSpecified4output() throws Exception {
    ActionCallback requestCallback = channelIn("http://uriFaultOnly-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 12 with ActionCallback

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

the class AbstractWSATests method toAndReplyTo.

/**
     * Creates WS-Addressing To and ReplyTo param for request
     * 
     * @param action
     * @param replyTo
     * @return
     * @throws URISyntaxException
     */
protected final ActionCallback toAndReplyTo(String to, String replyTo) throws URISyntaxException {
    requestInputAction = "http://doesn-not-matter.com";
    ActionCallback requestCallback = new ActionCallback(new URI(requestInputAction), new Addressing10(), new URI(to));
    if (replyTo != null) {
        requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
    }
    return requestCallback;
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Addressing10(org.springframework.ws.soap.addressing.version.Addressing10) URI(java.net.URI) EndpointReference(org.springframework.ws.soap.addressing.core.EndpointReference)

Example 13 with ActionCallback

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

the class CamelDirectSenderTest method camelInvalid.

@Test
public void camelInvalid() throws Exception {
    ActionCallback requestCallback = toAndReplyTo("http://sender-camel.com", "mailto:not-mappped-address@chocolatejar.eu");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Test(org.junit.Test)

Example 14 with ActionCallback

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

the class CamelDirectSenderTest method camelReceivedReplyTo.

@Test
public void camelReceivedReplyTo() throws Exception {
    ActionCallback requestCallback = channelIn("http://sender-camel.com");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    endpointCamelDirect.assertExchangeReceived(0);
    endpointCamelDirect.assertIsSatisfied();
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) Test(org.junit.Test)

Example 15 with ActionCallback

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

the class CamelDirectSenderTest method defaultMessageIdGenerator.

@Test
public void defaultMessageIdGenerator() throws Exception {
    ActionCallback requestCallback = channelIn("http://messageIdStrategy-default.com");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(channelOut().getMessageId()).isNotEqualTo(new URI("staticTestId"));
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) URI(java.net.URI) 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