3 Replies Latest reply on Mar 20, 2013 11:02 AM by 940907

    Jaxb Issue to Migrate from JDK 1.3.1 to 1.6

      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"/>

      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?

      Mahesh B.

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