Toplink's Object to XML mapping
On OTN there is an excellent online seminar (replay) on the TopLink Object-to-XML support.
This feature, which will be available in the upcoming 10.1.3 release, allows converting XML files into Java objects and vice versa. For those allready working with TopLink’s Object-relational mapping, the following will sound very familiar.
It is built on the JAX-B 1.0 specification. This is one one way of using the TopLink workbench, based on an XML schema the workbench can generate Java Classes using its built-in JAX-B compiler. Toplink also generates mapping metadata. These metadata provide a definition of how a certain XML element corresponds to a certain Java element. In this way a buffering layer is created between your object model and the XML-schema. Changes in a XML schema don’t not have to lead to changes in your object model. The changes will be done in the mapping metadata.
This also means you can connect your existing object model to an XML schema . Just import the classes into the mapping workbench, specify the schema and make the mappings. You can also specify transformation rules, for example in your XML-schema gender is represented as F and M , but in Java you want it to be Female and male.
In your application the TopLink runtime will use the metadata to marshall and unmarshall you XML documents.
There is a lot of extra info (and a Developer preview) on the TopLink product page on OTN
A nice sideline question is whether JDevelopers ADF will have out of the box support for O-X Toplink projects
This entry was posted by Leon van Tegelen on November 25, 2004 at 12:25 pm, and is filed under AMIS, Databases, General, J(2)EE/Java, Java, Java, JEE, OAS and WebLogic Server, Oracle, Tools, Web, Web/Java. Follow any responses to this post through RSS 2.0.Both comments and pings are currently closed.