cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas P. Fuller" <>
Subject Question about adding the domain object into the response
Date Thu, 03 Feb 2011 16:44:14 GMT

I'm developing some web services using CXF and in a few places it would be dead 
easy to simply return the entity object. The problem with doing this is that:

1.) Sending the domain object could result in a lot of unnecessary information 
being sent to the client.
2.) It will expose our data model (ie. inner workings of our  application) to 
the client, which means if the data model changes, then  the clients will need 
to change as well.
3.) We will need to fiddle the data model to deal with a  marshalling issues on 
the client side (we have one low profile device and we already know this is 
going to be a problem).
Another solution is to have an external data model that is used specifically for 
calls to and responses from the web services. The trouble with this approach is 
that it requires quite a bit of work because we'll need to map one set of 
objects to another.

Am I correct in the way I view this or have I missed something?

If the mapping layer and external data model are required, would anyone have any 
suggestions on how to tackle the mapping effort quickly?

Thanks for your help,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message