Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
The moose likes Web Services and the fly likes benefits of a serialization framwork like castor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "benefits of a serialization framwork like castor" Watch "benefits of a serialization framwork like castor" New topic
Author

benefits of a serialization framwork like castor

Pankaj Kumarkk
Ranch Hand

Joined: Apr 17, 2011
Posts: 109
I want to know why you would use castor as a serialization framework when developing web services.

I understand that you can develop a web service without using an external serialization framework like castor. I would just like to know when it is recommended to use a external serialization framework like castor.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14655
    
  25

Nowadays we have JAXB, the standard Java API for XML binding. I would prefer to use that, just because it's the standard, instead of something like Castor. A few years ago JAXB didn't exist yet, so Castor was a good choice.

Especially if you use JAX-RS (Jersey) for RESTful webservices, JAXB is a great choice, because it understands JAXB annotations and makes it easy to create RESTful webservices - it can also serialize to JSON instead of XML, using the JAXB annotations.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
Consider Paul's rocket mass heater.
 
subject: benefits of a serialization framwork like castor