File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Jersey client architecture question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Jersey client architecture question." Watch "Jersey client architecture question." New topic

Jersey client architecture question.

Steven Miller

Joined: Apr 29, 2009
Posts: 4
I've been looking into using Jersey to write some REST web services.

Now I'm thinking about consuming them with another application, and wondered how most people do this. Would you recommend that I use the Jersey client api? That seemed like the easiest, since it will easily get me the data and convert it into web beans (if that's what they are called) that the client can then use, modify and update.

So the real puzzle is that it seems my client needs access to the web beans (XmlRootElement marked POJOs) and resource classes to be used. To do this, I'm thinking I'd need to generate a jar from the web service app that had these objects in them, so that I can then us the Jersey client api. Is this the correct way of thinking? Is there a better way?

If not, I guess I can just always have my client build its own objects from the json or xml that is returned. Just figured I'd ask how people are setting up their projects and deploying things. I obviously don't want two of the same beans in two different places in my source control.
I agree. Here's the link:
subject: Jersey client architecture question.
It's not a secret anymore!