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

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

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

WebServiceTemplate.setDefaultUri介绍

[英]Set the default URI to be used on operations that do not have a URI parameter.

Typically, either this property is set, or #setDestinationProvider(DestinationProvider), but not both.
[中]设置要在没有URI参数的操作上使用的默认URI。
通常,可以设置此属性,也可以设置#setDestinationProvider(DestinationProvider),但不能同时设置这两个属性。

代码示例

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

/** Sets the default URI used by the gateway. */
public final void setDefaultUri(String uri) {
  webServiceTemplate.setDefaultUri(uri);
}

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

/**
 * Gets the default uri.
 * @param defaultUri
 */
public void setDefaultUri(String defaultUri) {
  this.defaultUri = defaultUri;
  getWebServiceTemplate().setDefaultUri(defaultUri);
}

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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ws.client.core.WebServiceTemplate;

class ClientConnection {

  @Autowired
  private WebServiceTemplate webServiceTemplate;

  public synchronized Object sendRequestAndReceive(Object xmlRequest,
      final String uri) {
    webServiceTemplate.setDefaultUri(uri);
    Object object = webServiceTemplate.marshalSendAndReceive(xmlRequest);
    return object;
  }
}

代码示例来源:origin: spring-projects/Spring-Integration-in-Action

public BookingServiceWithStrongCoupling() {
 this.bookingDao = new SimpleBookingDao();
 WebServiceTemplate template = new WebServiceTemplate();
 template.setDefaultUri(System.getProperty(
   "meal.preference.service.uri"));
 this.mealPreferenceWebServiceInvoker = template;
}

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

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

  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);

  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);

  return webServiceTemplate;
 }
}

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

@Bean
  public WebServiceTemplate webServiceTemplate() {

    WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
    webServiceTemplate.setMarshaller(jaxb2Marshaller());
    webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
    webServiceTemplate.setDefaultUri(orderAddress);

    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");

  return webServiceTemplate;
 }
}

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

@Bean
  public WebServiceTemplate webServiceTemplate() {

    WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
    webServiceTemplate.setMarshaller(jaxb2Marshaller());
    webServiceTemplate.setUnmarshaller(jaxb2Marshaller());
    webServiceTemplate.setDefaultUri(orderAddress);

    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);

  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);

  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);
 // register the signatureSecurityInterceptor
 ClientInterceptor[] interceptors = new ClientInterceptor[] {clientSecurityInterceptor()};
 webServiceTemplate.setInterceptors(interceptors);
 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;
}

代码示例来源: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);
 // register the signatureSecurityInterceptor
 ClientInterceptor[] interceptors = new ClientInterceptor[] {clientSecurityInterceptor()};
 webServiceTemplate.setInterceptors(interceptors);
 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;
}

相关文章

WebServiceTemplate类方法