Hi,
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 several blogs, articles, posts using cxf-servlet.xml
and CXFServlet but none whatsoever completely using Java config. Heck, I'm
not sure if I even need CXFServlet. I did set it up though in my application
initializer class, mapped to "/calculator/*", along with a
"classpath:META-INF/cxf/cxf.xml" context param been set for the Spring
context listener. Lastly, I've a @Configuration class where I declare an
endpoint as follows:
@Configuration
@ImportResource({ "classpath:META-INF/cxf/cxf.xml" })
public class CXFConfig {
@Autowired
Bus cxfBus;
// More code
@Bean
public Endpoint calculator() {
EndpointImpl endpoint = new EndpointImpl(cxfBus, new Calculator());
endpoint.setAddress("/CalculatorService");
return endpoint;
With all this, when I try to view the WSDL, I get:
WARNING: Can't find the the request for
http://localhost:8080/<context-root>/calculator/CalculatorService's Observer
Any ideas on what I'm doing wrong?
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 several blogs, articles, posts using cxf-servlet.xml
and CXFServlet but none whatsoever completely using Java config. Heck, I'm
not sure if I even need CXFServlet. I did set it up though in my application
initializer class, mapped to "/calculator/*", along with a
"classpath:META-INF/cxf/cxf.xml" context param been set for the Spring
context listener. Lastly, I've a @Configuration class where I declare an
endpoint as follows:
@Configuration
@ImportResource({ "classpath:META-INF/cxf/cxf.xml" })
public class CXFConfig {
@Autowired
Bus cxfBus;
// More code
@Bean
public Endpoint calculator() {
EndpointImpl endpoint = new EndpointImpl(cxfBus, new Calculator());
endpoint.setAddress("/CalculatorService");
return endpoint;
With all this, when I try to view the WSDL, I get:
WARNING: Can't find the the request for
http://localhost:8080/<context-root>/calculator/CalculatorService's Observer
Any ideas on what I'm doing wrong?