Service Agent

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

Hi,

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.

/Stefan
Apr 28, 2006 at 1:01 AM
originally posted by: romzki

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

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

http://www.gotdotnet.com/codegallery/messageboard/thread.aspx?id=941d2228-3bb5-42fd-8004-c08595821170&mbid=62788f36-a963-4feb-8470-20f1a844ed2a&threadid=fb832d50-a454-4701-8af6-e1ee58c808b5

Thanks,
Matias
http://staff.southworks.net/blogs/matiaswoloski
Apr 28, 2006 at 4: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?

Thanks:)
Apr 29, 2006 at 5: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".

Matias
Apr 30, 2006 at 4: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 5:10 PM
originally posted by: matiaswoloski

The WebService Software Factory has recipes that generates that kind of mapping.
http://www.gotdotnet.com/codegallery/codegallery.aspx?id=6fde9247-53a8-4879-853d-500cd2d97a83

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

Matias
http://staff.southworks.net/blogs/matiaswoloski
May 2, 2006 at 10: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?.

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


Thanks
Venkat
May 3, 2006 at 1: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. :(


Regards,