Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315849

Summary: JAXB Class Generation Wizard: Use EclipseLink checkbox doesn't always show.
Product: [WebTools] Dali JPA Tools Reporter: Andrew Fernandez <ripsi_1>
Component: JAXBAssignee: Tran Le <tranle1>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: neil.hauge, shaun.smith, tranle1
Version: unspecified   
Target Milestone: 3.0 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrew Fernandez CLA 2010-06-04 17:59:40 EDT
Build Identifier: 

SUMMARY:

In my OEPE Helios workspace I have two web service projects: one that uses 10gR3 and the other that uses PS3 (the lastest WLS runtime).

I have the same info.xsd file and choose to generate JAXB files, yet "Use EclipseLink MOXy as the JAXB implementation," only shows for the 10gR3 project.

Here's the file:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
    targetNamespace="http://www.test.com/info" 
    xmlns:info="http://www.test.com/info">
	<complexType name="address">
		<sequence>
			<element name="street" type="string"></element>
			<element name="city" type="string"></element>
			<element name="state" type="string"></element>
		</sequence>
	</complexType>

	<complexType name="telephone">
		<sequence>
			<element name="type" type="string"></element>
			<element name="number" type="string"></element>
		</sequence>
	</complexType>

	<complexType name="name">
		<sequence>
			<element name="first" type="string"></element>
			<element name="last" type="string"></element>
		</sequence>
	</complexType>

	<complexType name="person">
		<sequence>
			<element name="name" type="info:name"></element>
			<element name="phone" type="info:telephone"
                  minOccurs="0" maxOccurs="unbounded"></element>
			<element name="address" type="info:address"
                        minOccurs="0" maxOccurs="1"></element>
		</sequence>
	</complexType>
</schema>



Reproducible: Always

Steps to Reproduce:
1. Launch OEPE Helios that has new JAXB wizard
2. Create PS3 web service project and place info.xsd into package under src
3. Create 10gR3 web service project and place info.xsd into package under src
4. Launch JAXB wizard in both projects.

Note checkbox only shows for 10gR3 project

Is this expected behavior. From my conversations, this doesn't seem to be the case.
Comment 1 Andrew Fernandez CLA 2010-06-09 18:40:40 EDT
use eclipselink Moxy checkbox shows for:

10gR3 
11gR1

Doesn't show for:

PS2 and PS3.

going to try PS1 too.
Comment 2 Neil Hauge CLA 2010-06-10 12:57:34 EDT
I think I can solve this mystery for you.  A decision was made to only show the "Use EclipseLink" checkbox when the project wasn't already configured to use EclipseLink.  If the EclipseLink library is on the project classpath (and the Dali EclipseLink feature is installed in Eclipse) EclipseLink's JAXB class generation will be used and no checkbox will be shown.

In your case, the Dali EclipseLink feature is likely present in all cases, so the checkbox visibility would be based on whether the EclipseLink library is on your project classpath.  Specifically, the class we are testing for in this case is org.eclipse.persistence.jaxb.xjc.MOXyXJC.

This disappearing checkbox is likely a temporary "feature" in Helios, as we plan to provide more structured JAXB support in the next release.  I can certainly understand how this could be perceived as a bug, but for the moment this is as designed.

I'm targeting this bug for 3.0 as I do think this functionality needs to be changed in the next release.
Comment 3 Neil Hauge CLA 2011-04-13 18:24:12 EDT
JAXB wizard functionality should be based on the user chosen platform now that  the JAXB facet and generic / eclipselink platforms are available.
Comment 4 Neil Hauge CLA 2011-04-19 16:29:54 EDT
To expand on my last comment, my thought is that there would now be no need for a checkbox as the decision for what code generation to invoke would be based on the currently selected JAXB platform.
Comment 5 Tran Le CLA 2011-04-27 19:26:02 EDT
The checkbox is still necessary for non JAXB project. For JAXB project the checkbox will not appear, and MOXy usage will be based on the project’s JAXB platform.
Please reopen if further enhancement needed.