Hi Neale, Can you clarify few things for me please.
I have a service which happily runs with Jersey, but I'm struggling with getting it up and running under CXF. I'm baffled as to what I'm doing wrong... The service starts as follows: @Path("/themes") public class Service { ... and I've tried two CXF approaches to publishing it: 1) final ServletAdapter adapter = new ServletAdapter(); adapter.addInitParameter( "config-location", "cxf-beans.xml" ); adapter.setServletInstance( new CXFServlet() ); adapter.setContextPath( BASE_URI.getPath() ); selector = GrizzlyServerFactory.create(BASE_URI, adapter);
what is the value of BASE_URI.getPath() ? Can you post a complete main() sample code which creates a selector and runs it ? So that I can quickly create a test code ?
Result shows that my config is being read:
<snip/> where cxf-beans.xml is as per the example:
<beans ...> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-jaxrs-binding.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <jaxrs:server id="server" address="/"> <!-- also tried /themes --> <jaxrs:serviceBeans> <ref bean="service" /> </jaxrs:serviceBeans> </jaxrs:server> <bean id="service" class="x.x.Service" /> </beans> But attempts to read give the following log: INFO: Setting the server's publish address to be / *WARNING: Can't find the request for http://localhost:9998/themes's Observer *
So is http://localhost:9998/themes URI ia what you type in say a browser? or is 'BASE_URI' part missing here, as Dan suggested earlier on ?
thanks, Sergey
