I am using JavaConfig to setup without web.xml for service registration with
JAXRSServerFactoryBean as following:
@Bean
@DependsOn("cxf")
public Server jaxRsServer(ApplicationContext appContext) {
logger.debug("creating jaxrsServer");
JAXRSServerFactoryBean factory =
RuntimeDelegate.getInstance().createEndpoint(
jaxRsApiApplication(), JAXRSServerFactoryBean.class);
factory.setServiceBeans(Arrays.<Object>asList(NoteRequestService,
helloService()));
factory.setAddress("/" + factory.getAddress());
factory.setProvider(jsonProvider());
return factory.create();
}
In my WebAppInitializer I have registered the CXFServelet as following:
private void addApacheCxfServlet(ServletContext servletContext) {
CXFServlet cxfServlet = new CXFServlet();
ServletRegistration.Dynamic appServlet =
servletContext.addServlet("CXFServlet", cxfServlet);
appServlet.setLoadOnStartup(1);
Set<String> mappingConflicts = appServlet.addMapping("/notes/*");
}
When I visit the service listing page I am not seeing a proper list of services
with their WADL links. I see the following currently:
Available RESTful services:
Endpoint address: http://localhost:8080/messaging/soa//
WADL :
http://localhost:8080/notes/soa//?_wadl<http://localhost:8080/notes/soa/?_wadl>
Not sure what is wrong. I am using CXF 3.0.0 version and I have the
cxf-rt-rs-service-description jar in the pom as well.
Thanks
-Sonam