我試圖按照spring的啓動指導來運行SOAP服務器。問題是,它是引發此錯誤:defaultMethodEndpointAdapter bean創建錯誤
2016-09-19 09:43:39.797 WARN 8668 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultMethodEndpointAdapter' defined in class path resource [org/springframework/ws/config/annotation/DelegatingWsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter]: Factory method 'defaultMethodEndpointAdapter' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter.setCustomMethodArgumentResolvers(Ljava/util/List;)V
我的WS配置豆文件是:
@EnableWs
@Configuration
public class WebServiceConfig extends WsConfigurerAdapter {
@Bean
public ServletRegistrationBean messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
servlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean(servlet, "/ws/*");
}
@Bean(name = "expedientes")
public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema expedienteSchema) {
DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
wsdl11Definition.setPortTypeName("ExpedientesPort");
wsdl11Definition.setLocationUri("/ws");
wsdl11Definition.setTargetNamespace("http://localhost/ws");
wsdl11Definition.setSchema(expedienteSchema);
return wsdl11Definition;
}
@Bean
public XsdSchema expedienteSchema() {
return new SimpleXsdSchema(new ClassPathResource("Expedientes.xsd"));
}
}
它應該自動配置其餘的讓我無法理解這樣的錯誤。
我衝浪整個網站的一些相關的錯誤,但沒有任何幫助。 請提供任何提示?