JiBX: Starting from Code

# JiBX: Starting from Code |

JiBX Basics Overview Getting Started Binding Compiler Binding on Load Runtime Extras Building JiBX Maven Contributing License News and Status Support FAQ Mailing Lists Bugs User Comments Sponsors Start from Code Start from Code BindGen Example Code Example 1 Example 2 Example 3 Example 4 Customizations Reference SchemaGen Jibx2Wsdl Examples Customizations Start from Schema Start from Schema CodeGen Schema Datatype Handling Example Code Default Generation Simple Customizations More Customizations Modular Generation Customizations Reference Extensions Reference Binding Definition Binding Tutorial A basic binding Binding extras Structure mapping Collections and arrays Using mappings Advanced binding Method hooks Custom code Precompiled Bindings Definition details Definition contexts Conversions Date/time conversions XML summary <binding> element <include> element <format> element <namespace> element <mapping> element <value> element <structure> element <collection> element Attribute groups Usage API Runtime JavaDocs Subprojects Eclipse Plug-in Introduction Install Usage JiBX/WS Axis2 Usage JiBX/OTA Schema Library | ### Starting from Code Generating binding definitions and XML schema definitions from Java code is easy with JiBX. The BindGen tool, added in the 1.2 release, allows you to use both automatic and customized conversions for your Java classes. It provides a much better feature set than any of the alternative ways to generate schema definitions from Java code, including: Export JavaDocs as schema documentation Support for both untyped and typed (Java 5) collection classes Support for both custom typesafe enumerations and Java 5 enums Easy control over attribute vs. element, required vs. optional Clean schema structure, with customizations for fine-grained control For an in-depth look at using BindGen, see the JiBX 1.2, Part 1: Java code to XML schema tutorial on the IBM developerWorks site. You can also look over the BindGen examples included in the distribution, which are discussed in this section of the documentation. Besides generating schema definitions, you can also generate WSDL definitions from Java code. This uses the Jibx2Wsdl tool. Jibx2Wsdl builds on BindGen's features for generating data structure schemas, while adding equally-attractive features for generating WSDL service descriptions. This section of the documentation covers both BindGen and Jibx2Wsdl. It also includes information on the associated SchemaGen tool, which is primarily intended for use by BindGen and Jibx2Wsdl but can also be used directly.