Search in sources :

Example 6 with ClientHttpRequestMessageSender

use of org.springframework.ws.transport.http.ClientHttpRequestMessageSender in project spring-boot by spring-projects.

the class HttpWebServiceMessageSenderBuilderSimpleIntegrationTests method assertSimpleClientRequestFactory.

private SimpleClientHttpRequestFactory assertSimpleClientRequestFactory(WebServiceMessageSender messageSender) {
    assertThat(messageSender).isInstanceOf(ClientHttpRequestMessageSender.class);
    ClientHttpRequestMessageSender sender = (ClientHttpRequestMessageSender) messageSender;
    ClientHttpRequestFactory requestFactory = sender.getRequestFactory();
    assertThat(requestFactory).isInstanceOf(SimpleClientHttpRequestFactory.class);
    return (SimpleClientHttpRequestFactory) requestFactory;
}
Also used : SimpleClientHttpRequestFactory(org.springframework.http.client.SimpleClientHttpRequestFactory) SimpleClientHttpRequestFactory(org.springframework.http.client.SimpleClientHttpRequestFactory) ClientHttpRequestFactory(org.springframework.http.client.ClientHttpRequestFactory) ClientHttpRequestMessageSender(org.springframework.ws.transport.http.ClientHttpRequestMessageSender)

Example 7 with ClientHttpRequestMessageSender

use of org.springframework.ws.transport.http.ClientHttpRequestMessageSender in project spring-boot by spring-projects.

the class WebServiceTemplateBuilderTests method messageSendersShouldReplaceExisting.

@Test
void messageSendersShouldReplaceExisting() {
    WebServiceTemplate template = this.builder.messageSenders(new ClientHttpRequestMessageSender()).messageSenders(this.messageSender).build();
    assertThat(template.getMessageSenders()).containsOnly(this.messageSender);
}
Also used : WebServiceTemplate(org.springframework.ws.client.core.WebServiceTemplate) ClientHttpRequestMessageSender(org.springframework.ws.transport.http.ClientHttpRequestMessageSender) Test(org.junit.jupiter.api.Test)

Example 8 with ClientHttpRequestMessageSender

use of org.springframework.ws.transport.http.ClientHttpRequestMessageSender in project spring-boot by spring-projects.

the class WebServiceTemplateBuilderTests method assertHttpComponentsRequestFactory.

private void assertHttpComponentsRequestFactory(WebServiceMessageSender messageSender) {
    assertThat(messageSender).isInstanceOf(ClientHttpRequestMessageSender.class);
    ClientHttpRequestMessageSender sender = (ClientHttpRequestMessageSender) messageSender;
    ClientHttpRequestFactory requestFactory = sender.getRequestFactory();
    assertThat(requestFactory).isInstanceOf(HttpComponentsClientHttpRequestFactory.class);
}
Also used : ClientHttpRequestFactory(org.springframework.http.client.ClientHttpRequestFactory) HttpComponentsClientHttpRequestFactory(org.springframework.http.client.HttpComponentsClientHttpRequestFactory) ClientHttpRequestMessageSender(org.springframework.ws.transport.http.ClientHttpRequestMessageSender)

Aggregations

ClientHttpRequestMessageSender (org.springframework.ws.transport.http.ClientHttpRequestMessageSender)8 Test (org.junit.jupiter.api.Test)5 ClientHttpRequestFactory (org.springframework.http.client.ClientHttpRequestFactory)5 SimpleClientHttpRequestFactory (org.springframework.http.client.SimpleClientHttpRequestFactory)4 HttpComponentsClientHttpRequestFactory (org.springframework.http.client.HttpComponentsClientHttpRequestFactory)3 WebServiceTemplate (org.springframework.ws.client.core.WebServiceTemplate)2 RequestConfig (org.apache.http.client.config.RequestConfig)1 OkHttp3ClientHttpRequestFactory (org.springframework.http.client.OkHttp3ClientHttpRequestFactory)1