org.springframework.ws.client.core.WebServiceTemplate.setMessageSender()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(217)

本文整理了Java中org.springframework.ws.client.core.WebServiceTemplate.setMessageSender()方法的一些代码示例,展示了WebServiceTemplate.setMessageSender()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServiceTemplate.setMessageSender()方法的具体详情如下:
包路径:org.springframework.ws.client.core.WebServiceTemplate
类名称:WebServiceTemplate
方法名:setMessageSender

WebServiceTemplate.setMessageSender介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-integration

public void setMessageSender(WebServiceMessageSender messageSender) {
  Assert.state(!this.webServiceTemplateExplicitlySet,
      () -> "'messageSender' must be specified on the provided: " + this.webServiceTemplate);
  this.webServiceTemplate.setMessageSender(messageSender);
}

代码示例来源:origin: org.springframework.ws/spring-ws-core

/** Sets a single {@code WebServiceMessageSender} to be used by the gateway. */
public final void setMessageSender(WebServiceMessageSender messageSender) {
  webServiceTemplate.setMessageSender(messageSender);
}

代码示例来源:origin: apache/servicemix-bundles

/** Sets a single {@code WebServiceMessageSender} to be used by the gateway. */
public final void setMessageSender(WebServiceMessageSender messageSender) {
  webServiceTemplate.setMessageSender(messageSender);
}

代码示例来源:origin: org.springframework.ws/org.springframework.ws

/** Sets a single <code>WebServiceMessageSender</code> to be used by the gateway. */
public final void setMessageSender(WebServiceMessageSender messageSender) {
  webServiceTemplate.setMessageSender(messageSender);
}

代码示例来源:origin: spring-projects/spring-ws

/** Sets a single {@code WebServiceMessageSender} to be used by the gateway. */
public final void setMessageSender(WebServiceMessageSender messageSender) {
  webServiceTemplate.setMessageSender(messageSender);
}

代码示例来源:origin: com.consol.citrus/citrus-ws

/**
 * Sets the message sender.
 * @param messageSender
 */
public void setMessageSender(WebServiceMessageSender messageSender) {
  this.messageSender = messageSender;
  getWebServiceTemplate().setMessageSender(messageSender);
}

代码示例来源:origin: stackoverflow.com

@Bean
public WebServiceTemplate webServiceTemplate() {
  WebServiceTemplate template = new WebServiceTemplate();
  template.setMessageSender(httpComponentsMessageSender());
  return template;
}

代码示例来源:origin: stackoverflow.com

RequestConfig config = RequestConfig
    .custom()
    .setProxy(new HttpHost("host"))
    .build();

CloseableHttpClient client = HttpClients
    .custom()
    .setDefaultRequestConfig(config)
    .build();

HttpComponentsMessageSender messageSender = new HttpComponentsMessageSender(client);

WebServiceTemplate wsTemplate = new WebServiceTemplate();
wsTemplate.setMessageSender(messageSender);
// Set other required properties ...

代码示例来源:origin: stackoverflow.com

WebServiceTemplate wst = new WebServiceTemplate(new SaajSoapMessageFactory());
wst.setMessageSender(new CustomHttpComponentsMessageSender());

代码示例来源:origin: stackoverflow.com

setDefaultUri("https://myServer/soapws/ws/");
Source requestSource = new ResourceSource(new ClassPathResource("MyRequest.xml"));
StringResult result = new StringResult();
WebServiceTemplate template = getWebServiceTemplate();

HttpsUrlConnectionMessageSender sender = new HttpsUrlConnectionMessageSender();
sender.setTrustManagers(new TrustManager[] { new UnTrustworthyTrustManager() });
template.setMessageSender(sender);

template.sendSourceAndReceiveToResult(requestSource, result);
System.out.println(result);

代码示例来源:origin: org.springframework.ws/spring-ws-test

/**
 * Creates a {@code MockWebServiceServer} instance based on the given {@link WebServiceTemplate}.
 *
 * @param webServiceTemplate the web service template
 * @return the created server
 */
public static MockWebServiceServer createServer(WebServiceTemplate webServiceTemplate) {
  Assert.notNull(webServiceTemplate, "'webServiceTemplate' must not be null");
  MockWebServiceMessageSender mockMessageSender = new MockWebServiceMessageSender();
  webServiceTemplate.setMessageSender(mockMessageSender);
  return new MockWebServiceServer(mockMessageSender);
}

代码示例来源:origin: spring-projects/spring-ws

/**
 * Creates a {@code MockWebServiceServer} instance based on the given {@link WebServiceTemplate}.
 *
 * @param webServiceTemplate the web service template
 * @return the created server
 */
public static MockWebServiceServer createServer(WebServiceTemplate webServiceTemplate) {
  Assert.notNull(webServiceTemplate, "'webServiceTemplate' must not be null");
  MockWebServiceMessageSender mockMessageSender = new MockWebServiceMessageSender();
  webServiceTemplate.setMessageSender(mockMessageSender);
  return new MockWebServiceServer(mockMessageSender);
}

代码示例来源:origin: apache/servicemix-bundles

/**
 * Creates a {@code MockWebServiceServer} instance based on the given {@link WebServiceTemplate}.
 *
 * @param webServiceTemplate the web service template
 * @return the created server
 */
public static MockWebServiceServer createServer(WebServiceTemplate webServiceTemplate) {
  Assert.notNull(webServiceTemplate, "'webServiceTemplate' must not be null");
  MockWebServiceMessageSender mockMessageSender = new MockWebServiceMessageSender();
  webServiceTemplate.setMessageSender(mockMessageSender);
  return new MockWebServiceServer(mockMessageSender);
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() throws Exception {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 // set a httpsUrlConnectionMessageSender to handle the HTTPS session
 webServiceTemplate.setMessageSender(httpsUrlConnectionMessageSender());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() throws Exception {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 webServiceTemplate.setMessageSender(httpComponentsMessageSender());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 webServiceTemplate.setMessageSender(webServiceMessageSender());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(
   "http://localhost:8080/codenotfound/ws/helloworld");
 webServiceTemplate
   .setMessageSender(httpUrlConnectionMessageSenderTimeout());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 // set a HttpComponentsMessageSender which provides support for basic authentication
 webServiceTemplate.setMessageSender(httpComponentsMessageSender());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() throws Exception {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 webServiceTemplate.setMessageSender(httpComponentsMessageSender());
 return webServiceTemplate;
}

代码示例来源:origin: code-not-found/spring-ws

@Bean
public WebServiceTemplate webServiceTemplate() throws Exception {
 WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
 webServiceTemplate.setMarshaller(jaxb2Marshaller());
 webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
 webServiceTemplate.setDefaultUri(defaultUri);
 // set a httpsUrlConnectionMessageSender to handle the HTTPS session
 webServiceTemplate.setMessageSender(httpsUrlConnectionMessageSender());
 return webServiceTemplate;
}

相关文章

WebServiceTemplate类方法