This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206943 - Support for creating MOXy binding for existing POJOs
Summary: Support for creating MOXy binding for existing POJOs
Status: NEW
Alias: None
Product: webservices
Classification: Unclassified
Component: JAXB (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 15:18 UTC by Petr Jiricka
Modified: 2013-07-24 08:08 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-01-05 15:18:38 UTC
The latest release of Jersey supports EclipseLink's MOXy implementation of JAXB
for data binding, see:
http://blogs.oracle.com/japod/entry/jersey_1_11_is_released

The main use case for MOXy's external binding is to be able to map an existing (non-annotated) POJO to XML or JSON. This can be done by creating the binding in the appropriate package (eclipselink-oxm.xml and jaxb.properties files - see the example attached to the blog).

NetBeans could provide a wizard (called something like "XML or JSON binding for existing POJOs") that would let the user specify a package, and create the appropriate binding files for this package (ideally taking into consideration the files that already exist in this package).
Comment 1 japod 2012-01-05 16:05:05 UTC
Just a small clarification, 
for POJO<->JSON processing, Jersey uses a 3rd party, Jackson, library.
There the only configuration needed is to add the com.sun.jersey.api.json.POJOMappingFeature (see [1]) 
to the Jersey ResourceConfig (JerseyServlet) init parameters.

For MOXy configuration the above description is fine.

[1]http://jersey.java.net/nonav/documentation/latest/json.html#d4e893