本文整理汇总了Java中org.springframework.ws.transport.http.MessageDispatcherServlet类的典型用法代码示例。如果您正苦于以下问题:Java MessageDispatcherServlet类的具体用法?Java MessageDispatcherServlet怎么用?Java MessageDispatcherServlet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MessageDispatcherServlet类属于org.springframework.ws.transport.http包,在下文中一共展示了MessageDispatcherServlet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, "/ws/*");
}
示例2: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
log.info("Registering message dispatcher servlet.");
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, "/soap-api/*");
}
示例3: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(
ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
String path = this.properties.getPath();
String urlMapping = (path.endsWith("/") ? path + "*" : path + "/*");
ServletRegistrationBean registration = new ServletRegistrationBean(servlet,
urlMapping);
WebServicesProperties.Servlet servletProperties = this.properties.getServlet();
registration.setLoadOnStartup(servletProperties.getLoadOnStartup());
for (Map.Entry<String, String> entry : servletProperties.getInit().entrySet()) {
registration.addInitParameter(entry.getKey(), entry.getValue());
}
return registration;
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:17,代码来源:WebServicesAutoConfiguration.java
示例4: onStartup
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
AnnotationConfigWebApplicationContext applicationContext = buildApplicationContext();
Dynamic appServlet = servletContext.addServlet("appServlet", new DispatcherServlet(applicationContext));
appServlet.setLoadOnStartup(1);
appServlet.addMapping("/api/*", "/app/*");
MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet(applicationContext);
messageDispatcherServlet.setTransformWsdlLocations(true);
Dynamic wsServlet = servletContext.addServlet("wsServlet", messageDispatcherServlet);
wsServlet.setLoadOnStartup(2);
wsServlet.addMapping("/ws/*");
FilterRegistration.Dynamic filter = servletContext.addFilter("openEntityManagerInViewFilter", buildOpenEntityManagerFilter());
filter.addMappingForUrlPatterns(getDispatcherTypes(), false, "/api/*", "/app/*","/ws/*");
servletContext.addListener(new ContextLoaderListener(applicationContext));
}
示例5: before
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Before
public void before() throws Exception {
// Start jetty to provide spring webservice
server = new Server(new InetSocketAddress("127.0.0.1", 0));
ServletContextHandler contextHandler = new ServletContextHandler(ServletContextHandler.NO_SECURITY);
contextHandler.setContextPath("/");
final MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet();
messageDispatcherServlet.setContextConfigLocation("classpath:springWsServer.xml");
messageDispatcherServlet.setTransformWsdlLocations(true);
contextHandler.addServlet(new ServletHolder(messageDispatcherServlet), "/*");
server.setHandler(contextHandler);
server.start();
final String serverUrl = "http://" + server.getConnectors()[0].getName() + "/springws/TestserviceEndpoint";
// Init jaxws client with TraceeClientHandler
final JaxwsTestserviceEndpointService endpointService = new JaxwsTestserviceEndpointService();
endpointService.setHandlerResolver(new TraceeClientHandlerResolver());
testservice = endpointService.getCurrentTraceeContextPort();
((BindingProvider) testservice).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serverUrl);
}
示例6: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, "/ws/*");
}
示例7: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, "/v1/customers/*");
}
示例8: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
return new ServletRegistrationBean(servlet, "/codenotfound/ws/*");
}
示例9: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
return new ServletRegistrationBean(servlet, "/codenotfound/ws/*");
}
示例10: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(
ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
return new ServletRegistrationBean(servlet,
"/codenotfound/ws/*");
}
示例11: dispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean dispatcherServlet(
ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
return new ServletRegistrationBean(servlet, "/services/*");
}
示例12: addServiceDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
private void addServiceDispatcherServlet(ServletContext container, AnnotationConfigWebApplicationContext rootContext) {
MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet(rootContext);
messageDispatcherServlet.setTransformWsdlLocations(true);
ServletRegistration.Dynamic dispatcher = container.addServlet("spring-ws", messageDispatcherServlet);
dispatcher.setLoadOnStartup(1);
Set<String> mappingConflicts = dispatcher.addMapping(SERVICES_MAPPING);
if (!mappingConflicts.isEmpty()) {
for (String s : mappingConflicts) {
LOG.error("Mapping conflict: " + s);
}
throw new IllegalStateException("'spring-ws' could not be mapped to '" + SERVICES_MAPPING + "'");
}
}
示例13: messageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, getServletMapping());
}
示例14: testCreateConnection
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
@Test
public void testCreateConnection() throws Exception
{
assertNotNull(messageSender);
assertSame(applicationContext.getBean(MessageDispatcherServlet.DEFAULT_MESSAGE_FACTORY_BEAN_NAME), messageSender.getMessageFactory());
assertSame(applicationContext.getBean(MessageDispatcherServlet.DEFAULT_MESSAGE_RECEIVER_BEAN_NAME), messageSender.getWebServiceMessageReceiver());
}
示例15: createMessageDispatcherServlet
import org.springframework.ws.transport.http.MessageDispatcherServlet; //导入依赖的package包/类
/**
* Creates a spring-ws message dispatcher servlet
* @param contextConfigLocation The spring configuration classes
* @return A message dispatcher servlet based on the supplied configuration
*/
public static MessageDispatcherServlet createMessageDispatcherServlet(Class... contextConfigLocation) {
StringBuilder items = new StringBuilder();
for (Class aClass : contextConfigLocation) {
items.append( aClass.getName());
items.append(",");
}
MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet();
messageDispatcherServlet.setContextClass(AnnotationConfigWebApplicationContext.class);
messageDispatcherServlet.setContextConfigLocation(removeEnd(items.toString(), "," ));
messageDispatcherServlet.setTransformWsdlLocations(true);
return messageDispatcherServlet;
}