Java Object Serialization with XML, How to acheive?

Discussions

XML & Web services: Java Object Serialization with XML, How to acheive?

  1. Hi All,
    I'm Shesh here, pretty new to XML / Java Web Services, (and also to theServerside.com) Please can anyone help me out in Serializing a Java object into a XML instance document through a java code. I thought of acheiving this through, javax.xml.rpc.encoding package, but i couldnt make it.
    Please help me out in that,
    thank u
    regards
    shesh
  2. Try JAXB. Alltough it hasn't been released officially yet, you can download an early access edition, which has been around for quite a while. It only supports plain old DTD's though. If you need Java binding based on XML Schema, and if you want it for free, you could consider Castor. If you want a commercial version, you should consider XML Breeze (or Breeze XML?) Another nice option is jnerd's xml2java.
  3. I'm using a great package called ElectricXML from www.themindelectric.com.

    It does basic data binding and SOAP object encoding of Java objects
  4. The two I hear talked about the most are Castor and Zues. I have used Castor and it is a great tool.

    Zues

    http://zeus.enhydra.org/

    Castor

    http://castor.exolab.org/

    David