Generating JAXB classes from an XML using RAD
Java Architecture for XML Binding (JAXB) is a framework that allows Java developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects.
Below are the steps for generating JAXB classes:
Below are the steps for generating JAXB classes:
- Create a new folder under ServerExtensionsLogic project and copy the XML to it.
- Right click on XML > Generate > XML Schema.
- Step 2 will create a schema definition file in the specified folder. Right click the newly created xsd file > Generate > Java.
- From the XSD to Java dialog, select Generator 'Schema to JAXB Java Classes' and click Next.
- Select Target Java Container (java project inside which the newly created classes to be placed) and specify value for Target Package (package for the newly created classes). Click Finish.
- Refresh the Target Java Container project you mentioned in the previous step and navigate to the package you specified to see the newly created Java classes.
Comments
Post a Comment