tree: 4b6bf946fcaf95ed8c5e3051c6883d8ad1ad773f [path history] [tgz]
  1. src/
  2. bnd.bnd
  3. pom.xml
  4. README.md
samples/rest/impl-jackson/README.md

CXF DOSGi example REST jackson

This is a variant of the REST example and shows how to switch to jackson.

In plain CXF we would need to do two things

  • Set the bus property skip.default.json.provider.registration=true
  • Add com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider as a JAXRS provider

In CXF-DOSGi we can set the bus property by using a special service property on out TaskResourceImpl.

We can also set the JacksonJaxbJsonProvider by creating a separate class that offers the provider as an Remote Service Admin intent. As a last step we must add the intent to the TaskResourceImpl using another service property.