Service Agent

Topics: CAB & Smart Client Software Factory
Apr 5, 2006 at 5:08 AM
originally posted by: stefan_skoog


I'm currently testing the BAT and have come to the point where I want to call a webservice.
I've followed the instructions in the BAT chm-file and created a webservice and the serviceProxies. However I can’t figure out how to call it from my Presenter class. When looking at the AppraiserWorkbench application I saw that it implemented a ServiceAgent class to wrap the serviceProxies. However I can't find anything about this in the documentation. Do I need to implement the ServiceAgent. If yes how is this done. If no how do I instantiate and use the methods in the serviceProxies.

Apr 28, 2006 at 12:01 AM
originally posted by: romzki

Hi anyone can answer this? i need to know this also.
Apr 28, 2006 at 3:27 AM
originally posted by: matiaswoloski

Hi, take a look at this thread. Specially the second message.

Apr 28, 2006 at 3:02 PM
originally posted by: romzki

Follow up question: i have'nt seen any info in help file discussing how to create this service agent. do i need to create this manually?

Apr 29, 2006 at 4:45 AM
originally posted by: matiaswoloski

Yes. The service agent might be created manually. SCSF does not provide any recipe to do that.
In the CHM provided on the latest drop you will find this topic "Service Agent Proxy API Separation" under "Patterns".

Apr 30, 2006 at 3:51 PM
originally posted by: RolandLi

The work of converting the WS Types to Client Types is really boring.
I think we maybe need a code generator to create that ServiceTypeToClientType method...
Any thoughts?
Apr 30, 2006 at 4:10 PM
originally posted by: matiaswoloski

The WebService Software Factory has recipes that generates that kind of mapping.

You can change the Smart Client SF to reuse that recipe or you can install the Service SF and enable the package on your solution

May 2, 2006 at 9:27 PM
originally posted by: bvrao

What is the purpose of below code in AprisalServiceManagementAgent.cs. In the Bank teller example, DI is used in the presenter. When we should use it in the presenter and when it should be used in the ServiceAgent?.

public AppraisalManagementServiceAgent
ServiceDependency IFileTransferService fileTransferService,
ServiceDependency IFileWatcherService fileWatcherService
: this(new WebServiceProxies.AppraisalService.AppraisalManagementServiceProxy(),

May 3, 2006 at 12:54 AM
originally posted by: romzki

Thanks matias. Yes webservice software factory does it. However, it uses uses WCF and it's conflicting my version of system.runtime.serialization version when creating webservice. :(