Я попытался опубликовать сервис, но он генерирует EndPoint как SOAP, и мне нужно, чтобы он был типа REST.
Обычно настраивается в XML-файле. Но я использую весеннюю загрузку
@Configuration
@ImportResource({ "classpath:META-INF/cxf/cxf.xml" , "classpath:META-INF/cxf/cxf-servlet.xml" })
public class EndpointConfig{
@Bean
public ServletRegistrationBean<CXFServlet> servletRegistrationBean(ApplicationContext context) {
return new ServletRegistrationBean<CXFServlet>(new CXFServlet(), "/api/*");
}
@Autowired
private Bus bus;
@Bean
public Endpoint endpoint() {
EndpointImpl endpoint =
new EndpointImpl(bus, new confeccionesRest());
endpoint.publish("/confeccionesRest");
return endpoint;
}
}
сейчас: http://localhost:8080/api/confeccionesRest?wsdl
ожидается: http://localhost:8080/api/confeccionesRest?wadl