ServiceAgent translation of web service message

Topics: CAB & Smart Client Software Factory
Feb 7, 2006 at 1:15 PM
originally posted by: PJackson

One of my weekly tasks is to review the latest SCBAT drop and describe the changes to our various teams.

Some questions arose today regarding the ServiceAgent's translation of the web service message -- for instance:

WebServiceProxies.AppraisalService.Appraisal -> AppraisalServiceAgent.BusinessEntities.Appraisal

The questions seemed to surround the necessity / benefit of the ServiceAgent layer, for instance:

What is the benefit of this layer?

Why wouldn't the translation be done in the web service proxy? or in the calling client?

I was unable to muster sufficiently compelling arguments, so if there are any resources someone could point me at, I'd appreciate it.

("Wait for the 'Service Agent Proxy API Separation' pattern in the SCBAT docs to be fleshed out" would also be a perfectly acceptable answer :D )

Paul Jackson
Feb 8, 2006 at 9:21 AM
originally posted by: BradWilsonMSFT

The purpose of this separation is the transformation of service types (which are centered around service activities) from client/business layer types (which are centered around business layer activities). One of the few main features of the service agent is this type of data transformation.

A good example here is the metadata about an attachment. From the server point of view, it is merely a display name and the URL for getting and posting. On the client, though, there is a lot of additional metadata, like the download state, the local file system file name, etc.
Feb 9, 2006 at 6:15 AM
originally posted by: aesterline

What about duplication? It seems like there is a lot of duplication between the service layer and the web services layer (Address, AppraisalFilter, ...). Is there not a way to move this duplication into a shared project?
Feb 14, 2006 at 7:12 AM
originally posted by: jcelichirigoity

Think as you don't have access to the objects defined in the web-service layer, but just to the wdsl. That is what the RI-1 is showing and that web-service is just for demonstration and is not part of RI-1.

Of course, if you have access to a common library, you can avoid this duplication.