spring ws:未找到端点Map[saajsoapmessage请求]

baubqpgj  于 2021-07-13  发布在  Java
关注(0)|答案(0)|浏览(422)

2021-03-04 14:36:51.754警告3792---[nio-8080-exec-1]o.s.ws.server.endpointnotfound:找不到[saajsoapmessage请求]的终结点Map
我不知道我该怎么做才能使它正确
终结点

  1. @Slf4j
  2. @Endpoint
  3. public class ZFrontEndpoint {
  4. private static final String NAMESPACE_URI = "http://tempuri.org/";
  5. private static final String REQUEST = "Request";
  6. @PayloadRoot(namespace = NAMESPACE_URI, localPart = REQUEST)
  7. public @ResponsePayload SyncResponse syncResponse(@RequestPayload Request request) {
  8. log.info("request received");
  9. SyncResponse response = new SyncResponse();
  10. response.setAny("SUCCESS");
  11. return response;
  12. }
  13. }

服务配置

  1. @EnableWs
  2. @Configuration
  3. public class WebServiceConfig extends WsConfigurerAdapter {
  4. @Bean
  5. public ServletRegistrationBean<MessageDispatcherServlet> messageDispatcherServlet(ApplicationContext applicationContext) {
  6. MessageDispatcherServlet servlet = new MessageDispatcherServlet();
  7. servlet.setApplicationContext(applicationContext);
  8. servlet.setTransformWsdlLocations(true);
  9. servlet.setMessageFactoryBeanName("saajSoapMessageFactory");
  10. return new ServletRegistrationBean<>(servlet, "/z-front/*");
  11. }
  12. @Bean(name = "zFront")
  13. public Wsdl11Definition wsdl11Definition() {
  14. SimpleWsdl11Definition simpleWsdl11Definition = new SimpleWsdl11Definition();
  15. simpleWsdl11Definition.setWsdl(new ClassPathResource("ZFront.wsdl"));
  16. return simpleWsdl11Definition;
  17. }
  18. @Bean
  19. public SaajSoapMessageFactory saajSoapMessageFactory() {
  20. SaajSoapMessageFactory saajSoapMessageFactory = new SaajSoapMessageFactory();
  21. saajSoapMessageFactory.setSoapVersion(SoapVersion.SOAP_12);
  22. saajSoapMessageFactory.setLangAttributeOnSoap11FaultString(true);
  23. saajSoapMessageFactory.afterPropertiesSet();
  24. return saajSoapMessageFactory;
  25. }
  26. }

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题