Bug 296503 - Support invocation of JAXB schema generator
Summary: Support invocation of JAXB schema generator
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 2.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.3 M7   Edit
Assignee: Tran Le CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords: PII, plan
Depends on:
Blocks:
 
Reported: 2009-11-30 13:23 EST by Shaun Smith CLA
Modified: 2010-09-29 12:19 EDT (History)
3 users (show)

See Also:
neil.hauge: pmc_approved? (david_williams)
neil.hauge: pmc_approved? (raghunathan.srinivasan)
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved+
neil.hauge: pmc_approved? (kaloyan)
neil.hauge: review+


Attachments
Schema Generator (31.08 KB, patch)
2010-03-10 16:51 EST, Tran Le CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Smith CLA 2009-11-30 13:23:49 EST
EclipseLink includes an implementation of JAXB that offers high fidelity with JPA.  Amongst other uses, this supports the construction of JPA backed web services.  Given a JAXB mapped object model the schema generator will generate an XSD that supports the serialization of instances of the object model to XML. Adding support for schema generation will simplify construction of applications using both JAXB and JPA.
Comment 1 Neil Hauge CLA 2010-02-10 18:20:59 EST
This implementation should follow the general design laid out in bug 296502 comment 2.

Below is a proposal for the user interaction.

This functionality should originate in the standard New... Wizard in one or both of the following locations (feedback welcome):

"JAXB" (new folder)
"XML" (existing folder)

> "Schema from JAXB Classes"

In addition, a JAXB Tools" menu could be added to Java projects, but I would lean against this to avoid additional menu clutter.

The New wizard dialog should filter out projects that are not Java projects (for project selection).

Once a project has been selected, the user will need to select the package or classes that they wish to use for the generation.  Something similar to Export->Archive would be called for here.  (I assume we would need this level of granularity, or would be it be reasonable to only offer only the ability to select a project, where all annotated entities will be used in the schema gen?)

Another item required would be the schema destination folder.  The last item would be an extension dependent checkbox to specify if you are using EclipseLink as your JAXB implementation.
Comment 2 Tran Le CLA 2010-03-10 16:51:30 EST
Created attachment 161679 [details]
Schema Generator

Notes:
- this patch for JAXB schema generation generates from all classes included in a package.
- jaxb.properties file need to be present
- bunddle org.eclipse.jpt.jaxb.core.schemagen has to be exported to a jar and put in ECLIPSE_HOME/plugins
- package, project, folder may be selected to start the generation wizard.
Comment 3 Neil Hauge CLA 2010-04-21 17:17:02 EDT
Requesting PMC approval of UI change associated with this planned feature exception.  There is a new JAXB folder in the "New..." wizard associated with this change, with one wizard inside of this new folder for the purpose of XSD Generation using either the Sun RI JAXB Schema Gen or the EclipseLink JAXB Schema Gen.
Comment 4 Neil Hauge CLA 2010-04-22 11:29:34 EDT
Approving as this was for notification purposes.  This change requires compiling against EclipseLink but doesn't require shipping any EclipseLink components.
Comment 5 Neil Hauge CLA 2010-04-22 12:58:31 EDT
This was released in time for last night's I-build candidate.
Comment 6 Karen Butzke CLA 2010-04-28 14:00:02 EDT
verified fixed in WTP build I-3.2.0-20100427043043