Trying to deploy a JAX-WS endpoint using Tomcat 7 Maven plugin and CXF 2.7.8. As a matter of preference, I don\'t want to have any XML config for Spring or CXF. I see severa
If you're using Spring Boot, you can use:
org.apache.cxf
cxf-spring-boot-starter-jaxws
${cxf.version}
To add an endpoint:
import javax.xml.ws.Endpoint;
import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class WebServiceConfig {
@Bean
public Endpoint endpoint(Bus cxfBus) {
EndpointImpl endpoint = new EndpointImpl(cxfBus, new Calculator());
endpoint.publish("/CalculatorService");
return endpoint;
}
}
Official documentation of the CXF-Boot integration.