Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating Object from XML file

 
Purvesh Vora
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can you please tell me which tool( or probably which of the API) could be used for creating java object from an input XML file.

I heard that castor is the one that supports this. What jaxb does? if both of them are supporting the same thing then which one is better?
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAXB 2.0 would be my choice as it is part of Java 6 SE anyway.
 
Paulo Salgado
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I second that, specially if you're thinking about developing Web Services with Java, as data binding has been removed from the new JAX-RPC (JAX-WS). J2EE vendors will need to provide or use a JAXB implementation to be compliant.

As a feedback we've been using JAXB 1.1 for over a year without problems. Our XML Schemas are somewhat complex and JAXB handles them nicely, something that WSDL2Java from both Apache Axis and IBM Websphere didn't.

Regards.
 
Purvesh Vora
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Peer & Paulo.
 
gopinathang nathan
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For weblogic 'autotype' - http://e-docs.bea.com/wls/docs81/webserv/assemble.html#autotype
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic