Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Jaxb Issue to Migrate from JDK 1.3.1 to 1.6

940907Mar 19 2013 — edited Mar 20 2013
Hi All,

I have to migrate from JAXB (jaxb-rt-1.0-ea.jar, jaxb-xjc-1.0-ea.jar) to latest inbuild JAXB(2.1.10) using JDK1.6.

Previous JAXB code generated from .dtd (data type defination) & .xjs (java binding schema) file using XJC.

Here is the sample address.dtd file,

<!ELEMENT address-DTO EMPTY>
<!ATTLIST address-DTO name CDATA #REQUIRED >
<!ATTLIST address-DTO description CDATA #REQUIRED >
<!ATTLIST address-DTO address-id CDATA #REQUIRED >
<!ATTLIST address-DTO address-line-1 CDATA #REQUIRED >
<!ATTLIST address-DTO address-line-2 CDATA #REQUIRED >
<!ATTLIST address-DTO address-line-3 CDATA #REQUIRED >
<!ATTLIST address-DTO town CDATA #REQUIRED >
<!ATTLIST address-DTO district CDATA #REQUIRED >
<!ATTLIST address-DTO postcode CDATA #REQUIRED >
<!ATTLIST address-DTO country-id CDATA #REQUIRED >
<!ATTLIST address-DTO switchboard-telephone-number CDATA #REQUIRED >
<!ATTLIST address-DTO fax-number CDATA #REQUIRED >


Corresponding address.xjs file is here,

<xml-java-binding-schema version="1.0-ea">
<options package="com.test"/>
<element name="address-DTO" type="class" root="true">
<attribute name="address-id" convert="long"/>
<attribute name="country-id" convert="long"/>
</element>
</xml-java-binding-schema>

Based earlier JAXB version we have produce Java code.

Now we have to migrate to JAXB(2.1.10) inbuild in JDK1.6. in order to generate Java code.

What will be the Best Possible way to do that in order to generate simillar JAXB code?

Regards,
Mahesh B.

Edited by: Bmahesh on Mar 19, 2013 9:24 AM

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 17 2013
Added on Mar 19 2013
3 comments
2,654 views