web service data type (contract)

Posted by cyberguest on Stack Overflow See other posts from Stack Overflow or by cyberguest
Published on 2010-03-12T16:22:33Z Indexed on 2010/03/19 20:21 UTC
Read the original article Hit count: 117

Filed under:
|
|
|

hi, i have a general design question.

we have a fairly big data model that represents an clinical object, the object itself has 200+ child attributes in the hierarchy.

and we have a SetObject operation, and a GetObject operation. my question is, best practice wise, would it make sense to use that single data model in both operations or different data model for each? Because the Get operation will return much more details than what's needed for Set.

an example of what i mean: the data model has say ProviderId, and ProviderName attributes, in the Get operation, both the ProviderId, and ProviderName would need to be returned. However, in the Set operation, only the ProviderId is needed, and ProviderName is ignored by the service since system has that information already. In this case, if the Get and Set operations use the same data model, the ProviderName is exposed even for Set operation, does that confuse the consuming developer?

© Stack Overflow or respective owner

Related posts about soa

Related posts about webservice