Hello,
I am not sure how to configure a JSONProvider in CXF DOSGI.
I have a single OSGI bundle that declares a REST interface and
implementation.
The REST interface is defined as:
@Path("dashboard")
public interface DashboardRS {
@GET
@Path("get")
@Produces(MediaType.APPLICATION_JSON)
Dashboards getDashboards();
@GET
@Path("get/{name}")
@Produces(MediaType.APPLICATION_JSON)
Dashboard getDashboard(@PathParam("name") final String name);
}
It is configured in its Activator as:
Dictionary<String, String> settings = new Hashtable<String, String>();
settings.put("service.exported.interfaces", "*");
settings.put("service.exported.configs, "org.apache.cxf.rs");
settings.put("service.exported.intents", "HTTP");
settings.put("org.apache.cxf.rs.address", "http://localhost:9000/");
Activator.context.registerService(DashboardRS.class.getName(),
new DashboardRSImpl(), settings);
The bundle manifest is created as:
Manifest-Version: 1.0
Bnd-LastModified: 1337112570807
Build-Jdk: 1.6.0_26
Built-By: tony
Bundle-Activator: dashboard.Activator
Bundle-ManifestVersion: 2
Bundle-Name: Dashboard REST Service
Bundle-SymbolicName: service.dashboard
Bundle-Version: 0.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: service.dashboard;uses:="org.osgi.frame
work,javax.xml.bind.annotation,javax.ws.rs";version="0.0.1.SNAPSHOT"
Import-Package: javax.ws.rs;version="[1.0,2)",javax.xml.bind.annotation;
version="[2.1,3)",org.osgi.framework;version="[1.5,2)"
Tool: Bnd-1.50.0
Do I have to configure a JSON provider? If so how is that done in DOSGI?
Thanks for the help!
Tony