Examples of ActionCallback


Examples of org.springframework.ws.soap.addressing.client.ActionCallback

     * @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;
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

            // Add WS-Addressing Action to webservice request (the WS-Addressing
            // 'to' header will default to the URL of the connection).
            // Note that exchange header takes precedence over endpoint option
            URI wsAddressingAction = wsAddressingActionHeader != null ? wsAddressingActionHeader : endpoint.getConfiguration().getWsAddressingAction();
            if (wsAddressingAction != null) {
                new ActionCallback(wsAddressingAction).doWithMessage(message);
            }
        }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        return newChannelParams();
    }

    @Test
    public void endpointSender() throws Exception {
        ActionCallback requestCallback = channelIn("http://sender-default.com");

        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);

        Assertions.assertThat(channelOut().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
    }

    @Test
    public void customSender() throws Exception {
        ActionCallback requestCallback = channelIn("http://sender-custom.com");

        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);

        Assertions.assertThat(customChannelParams().getTo()).isEqualTo(new URI("mailto:andrej@chocolatejar.eu"));
        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
    }

    @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();
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        Assertions.assertThat(endpointCamelDirect.getReceivedCounter()).isZero();
    }

    @Test
    public void camelReceivedReplyTo() throws Exception {
        ActionCallback requestCallback = channelIn("http://sender-camel.com");

        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);
        endpointCamelDirect.assertExchangeReceived(0);
        endpointCamelDirect.assertIsSatisfied();
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        endpointCamelDirect.assertIsSatisfied();
    }
   
    @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"));
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        Assertions.assertThat(channelOut().getMessageId()).isEqualTo(new URI("staticTestId"));
    }
   
    @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"));
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

*/
public abstract class AbstractConsumerTests extends AbstractWSATests {

    @Test
    public void defaultAction4ouput() throws Exception {
        ActionCallback requestCallback = channelIn("http://default-ok.com/");

        webServiceTemplate.sendSourceAndReceiveToResult(source, requestCallback, result);

        Assertions.assertThat(channelOut().getAction()).isEqualTo(getDefaultResponseAction());
    }
View Full Code Here

Examples of org.springframework.ws.soap.addressing.client.ActionCallback

        Assertions.assertThat(channelOut().getAction()).isEqualTo(getDefaultResponseAction());
    }

    @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
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.