Creating XML facade from XSD
This recipe describes how to create XML facade classes from XSD. Usually, the necessity to access XML content out of Java classes comes from already defined XML schemas in BPEL processes.
How to do it...
We have already defined the BPEL process and the XML schema (Derivative_Cashflow.xsd
) in the project. The following steps will show you how to create the XML facade from the XML schema:
- Select the CashflowFacade project, right-click on it, and select New. Select JAXB 2.0 Content Model from XML Schema.
- Select the schema file from the Banking_BPEL project. Select the Package Name for Generated Classes checkbox and click on the OK button.
The corresponding Java classes for the XML schema were generated.
How it works...
Now compare the classes generated via the ANT utility in the Generating XML facade using ANT recipe with this one. In essence, the generated files are the same. However, we see the additional file jaxb.properties
, which holds the configuration of the...