Toplink’s Object to XML mapping

Leon van Tegelen
0 0
Read Time:1 Minute, 20 Second

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

About Post Author

Leon van Tegelen

Consultant at AMIS
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

Overflow in Wp-Dstats2 Wordpress plugin?

There seems to be a problem in the PHP code of the Wp-Dstats2 statistics plug-in for WordPress. The problem occurs when your number of unique visitors (unique IPs) grows large, typically somewhat less that 30.000. Related posts: Starting with JasperReports Report from JavaOne 2008 – download session resources ADF Faces […]
%d bloggers like this: