>If you take the position of some at java.net, then it would be that they
>do belong together.  See hyperjaxb3.
>https://hyperjaxb3.dev.java.net/
>It is a little bit different context, I guess.   With hyperjaxb they are
>going from XML to object to DB, instead of the other way around, but
>similar principle as this could be used to go the other direction as
>well.

Prior to raising my questions I read slides 50-61 @ 
http://www.slideshare.net/caroljmcdonald/td09restcarol From what I understood 
of them, it seems to recommend separating the entity objects and 
request/response objects - the separation is achieved by having "converter" 
classes which convert the entity object to a request/response object. I was 
wondering if it was possible/acceptable to lump them together as shown in my 
earlier mail. Thanks for the links and clarification.

>>When using HTTP centric clients, must the client have a copy of the
>> request/response objects. If yes, is there anyway around it?
>Can you clarify please. What problem you seeing, when using WebClients

Lets take for example: 
Category category = 
client.path("service/category/1").accept("application/xml").get(Category.class)

With the code above the response from the RESTful web service gets mapped to 
the Category class, which means that the client code will have to have a copy 
of the request/response objects (which essentially means the entity objects). 
It just seems odd that the client code would basically need a copy of the 
entity objects used in the service, and I wanted to clarify if this.

Best,
Dan


      

Reply via email to