Search in sources :

Example 31 with ActionCallback

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

the class AbstractWSATests method actionAndReplyTo.

/**
     * Creates WS-Addressing Action and ReplyTo param for request
     * 
     * @param action
     * @param replyTo
     * @return
     * @throws URISyntaxException
     */
protected final ActionCallback actionAndReplyTo(String action, String replyTo) throws URISyntaxException {
    requestInputAction = action;
    ActionCallback requestCallback = new ActionCallback(action);
    if (replyTo != null) {
        requestCallback.setReplyTo(new EndpointReference(new URI(replyTo)));
    }
    return requestCallback;
}
Also used : ActionCallback(org.springframework.ws.soap.addressing.client.ActionCallback) URI(java.net.URI) EndpointReference(org.springframework.ws.soap.addressing.core.EndpointReference)

Example 32 with ActionCallback

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

the class CamelDirectSenderTest method customMessageIdGenerator.

@Test
public void customMessageIdGenerator() throws Exception {
    ActionCallback requestCallback = channelIn("http://messageIdStrategy-custom.com");
    webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
    Assertions.assertThat(channelOut().getMessageId()).isEqualTo(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