tree: 2d0265f44793eac4cc0a146bab02ae035cad8a65 [path history] [tgz]
  1. src/
  2. pom.xml
  3. 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.