I've been experimenting the past few days with Karaf. The osgi/blueprint parts 
work well enough but when I wanted to create some jaxrs rest endpoints I ran 
into trouble.
I mostly followed some blog posts as I can't seem to find official 
documentation for this particular feature.
See:

http://blog.nanthrax.net/2011/08/jax-rs-services-using-cxf-and-karaf/
http://www.dankulp.com/blog/2011/11/apache-cxf-in-osgi/

Only deviations I made would be:
- I removed some unused namespace and schema location declarations from the 
example blueprint xml files.
- I'm not using a jaxb annotated return value but a simple list of strings.
- I'm using gradle in lieu of maven.

The karaf log mentions my bundles are picked up and I can see some logs which 
appear to refer to the server address and the endpoints I defined in my 
blueprint xml.
At this point the blog posts suggest I can reach the jaxrs endpoint at 
http://localhost:8181/cfx/prefix/path but when I try this an exception in the 
karaf log file saya there is no match for the url. I can't make much sense of 
all this though I did see a log entry complaining about port 8181 already being 
in use. So perhaps cxf is started twice and my endpoints were bound to the 
instance unable to bind to 8181?

Lest I forget,
I don't know if this is the place to ask questions about the cxf feature. I 
couldn't find any indication of the feature's existence other than those 2 blog 
posts.
Perhaps someone could point me to the proper place?

Thanks,
Sebastian

PS: I can provide my sources on github if necessary.


Reply via email to