This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to do dynamic Java-XML binding? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to do dynamic Java-XML binding?" Watch "How to do dynamic Java-XML binding?" New topic
Author

How to do dynamic Java-XML binding?

Chris Johnston
Ranch Hand

Joined: Dec 13, 2004
Posts: 85
The project that I am working on is finally taking a look at doing somekind of Java <--> XML binding. Specifically, we receive XML files that need to be turned into Java objects (our object model). Those objects are then processed and turned into different XML files to be sent off to clients.

What we are looking for is a framework that allows us to do the marshalling/unmarshalling dynamically. By this I mean without having to worry about any compile time code generation. The ideal would be that, in order to handle a new XML schema, all we would need to do is provide a mapping/binding file, bounce the system, and the system should be able to handle the new schema.

Is this possible to do?

We have looked at JAXB, Castor, and JiBX, but all of these libraries require code generation.

We have also taken a cursory look at TopLink, but I don't think it is free and I am not sure if it can handle this either. Anyone know the pricing model for TopLink?
[ July 19, 2006: Message edited by: Chris Johnston ]

www.fuzzylizard.com
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1815
You could use XSLT to convert the incoming XML to a standard schema, which is then parsed, processed, and outputted.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to do dynamic Java-XML binding?
 
Similar Threads
Facade design pattern in web services
JAXB implentation query
Managing xsd types across multiple service projects
Java Web Services 2
what's the relationship between toplink and ejb?