- X2JB Core - provides the full implementation of binding mechanism that is independent from used binding provider
- X2JB Default Handlers - binding handlers for frequently used Java objects and primitives
- X2JB Providers - provider implementations that come with this project
-
X2JB (XML 2 Java Binding) 1.0 Final Released (10 messages)
- Posted by: Richard Opalka
- Posted on: April 04 2007 08:44 EDT
There are plenty of software projects that read XML configurations from files or network streams to provide configuration and initialization of the system. There are many ways of doing this common configuration stuff. The XML 2 Java Binding (X2JB) tool was designed with simplicity in mind to make these common configuration tasks very simple. The tool was developed with an intent of extensibility so it can be extended to unpredictable boundaries and easily used in many software projects. X2JB Java tool consists of three basic components:Threaded Messages (10)
- does it go back the other way?... by Arron Bates on April 04 2007 11:48 EDT
- Re: does it go back the other way?... by Richard Opalka on April 04 2007 14:20 EDT
- Another XML2Java... what for? by Dmitry Gusev on April 05 2007 03:12 EDT
- Re: Another XML2Java... what for? by bruno bch on April 05 2007 03:59 EDT
- Re: Another XML2Java... what for? by Richard Opalka on April 05 2007 04:15 EDT
-
Re: Another XML2Java... what for? by Srikanth Shreenivas on April 05 2007 09:26 EDT
- Re: Another XML2Java... what for? by Richard Opalka on April 05 2007 10:58 EDT
-
Re: Another XML2Java... what for? by Srikanth Shreenivas on April 05 2007 09:26 EDT
- Why is this better/worse than XStream? by Constance Eustace on April 05 2007 11:18 EDT
- Re: Why is this better/worse than XStream? by James Watson on April 09 2007 13:47 EDT
- Re: Why is this better/worse than XStream? by Niall Gallagher on April 13 2007 09:36 EDT
-
does it go back the other way?...[ Go to top ]
- Posted by: Arron Bates
- Posted on: April 04 2007 11:48 EDT
- in response to Richard Opalka
...can it unmarshal back into XML?... The round-trip is what I see as the important factor in the binding frameworks. I wrote a naive JAXB myself so I can get the beans to talk JSON as well as they talk XML. But as mentioned, the round-trip is the important part. Once you've done processing things, there are many times in a serving solution where it's terribly handy to get the data stream back out. Otherwise it will be just for configurations which has competition from Digester and so forth. If it can be round-tripping, it can play in the XML serving/processing space. -
Re: does it go back the other way?...[ Go to top ]
- Posted by: Richard Opalka
- Posted on: April 04 2007 14:20 EDT
- in response to Arron Bates
No, it's just one directional mapping only from XML to Java. It is intended to be used for configuration and notification purposes only ;-) -
Another XML2Java... what for?[ Go to top ]
- Posted by: Dmitry Gusev
- Posted on: April 05 2007 03:12 EDT
- in response to Richard Opalka
Isn't JAXB2 already supports all that stuff and even more? It is configurable via annotations too and its a JSR (JSR-222 to be precise)... Why should I use X2JB instead of JAXB2 then? -
Re: Another XML2Java... what for?[ Go to top ]
- Posted by: bruno bch
- Posted on: April 05 2007 03:59 EDT
- in response to Dmitry Gusev
+1 There is a real lack of imagination these days. Some ideas for open source projects : - a real web based project management tool (like OPX2), - a tool that generate automatically unit tests for web projects, - monitoring tool (like Patrol), - and so on... -
Re: Another XML2Java... what for?[ Go to top ]
- Posted by: Richard Opalka
- Posted on: April 05 2007 04:15 EDT
- in response to Dmitry Gusev
Yes, you are right. JAXB supports all that stuff and it is really cool tool. But it is so complicated to use it and to customize its binding mechanisms. The advantages of X2JB over JAXB2 are: * really simple read only API - it has only 2 classes, 4 interfaces and one optional annotation class * fully interface based - user defines only interfaces and mapping for each method of that interface * it is really very easy to customize the binding process * just one method call does all the stuff for youIsn't JAXB2 already supports all that stuff and even more?
It is configurable via annotations too and its a JSR (JSR-222 to be precise)...
Why should I use X2JB instead of JAXB2 then? -
Re: Another XML2Java... what for?[ Go to top ]
- Posted by: Srikanth Shreenivas
- Posted on: April 05 2007 09:26 EDT
- in response to Richard Opalka
JAXB is part of J2EE specs, and also part of JAX-WS. Given that, I wonder whether there is any compelling reason for using X2JB. Simplicity to use is a relative term, and most often developers should and will choose standard solution for a given problem. -
Re: Another XML2Java... what for?[ Go to top ]
- Posted by: Richard Opalka
- Posted on: April 05 2007 10:58 EDT
- in response to Srikanth Shreenivas
X2JB is not intended to be the replacement for JAXB. It is just another way how to configure your application/server. Take a look to webapp demo that is part of X2JB distribution and you will see what is it good for ;-)JAXB is part of J2EE specs, and also part of JAX-WS. Given that, I wonder whether there is any compelling reason for using X2JB. Simplicity to use is a relative term, and most often developers should and will choose standard solution for a given problem.
-
Why is this better/worse than XStream?[ Go to top ]
- Posted by: Constance Eustace
- Posted on: April 05 2007 11:18 EDT
- in response to Richard Opalka
Comments indicate this isn't round-trip or persistence oriented. If that's the case, I'd say XStream has this beaten soundly. XStream might not be a full persistence/binding platform, but it is dual-directional to/from XML. And it is practically zero-config. Unless you are hamstrung by a) legacy configuration objects or b) legacy XML format requirements and you can't change those, then use XStream. -
Re: Why is this better/worse than XStream?[ Go to top ]
- Posted by: James Watson
- Posted on: April 09 2007 13:47 EDT
- in response to Constance Eustace
Comments indicate this isn't round-trip or persistence oriented.
Thanks for the tip on XStream. This is exactly the kind of thing I've been looking for as part of my 'Java XML best practiceâ„¢'. One thing (not terribly important) does XStream have any tools for generating a schema (not necessarily W3C) from a Java class to match the XML it creates?
If that's the case, I'd say XStream has this beaten soundly. XStream might not be a full persistence/binding platform, but it is dual-directional to/from XML. And it is practically zero-config.
Unless you are hamstrung by a) legacy configuration objects or b) legacy XML format requirements and you can't change those, then use XStream. -
Re: Why is this better/worse than XStream?[ Go to top ]
- Posted by: Niall Gallagher
- Posted on: April 13 2007 09:36 EDT
- in response to Constance Eustace
Another option which allows bidirectional serialization is the Simple XML serialization framework. http://simple.sourceforge.net/ This differs from XStream in that it does not require any configuration, not configuration files, schemas, or even code mappings (which XStream seems to use a lot of). Also XML emitted from the Simple XML serialization framework is much more human readable and editable. Finally, after taking a look at X2JB it seems to me even less intuitive than even JAXB, and requires a lot of work to get few results.