{"id":34,"date":"2009-03-19T23:25:00","date_gmt":"2009-03-19T22:25:00","guid":{"rendered":"\/post\/2009\/03\/19\/Using-the-Agent-WebService-of-the-Response-Group-Service.aspx"},"modified":"2014-02-22T21:55:33","modified_gmt":"2014-02-22T20:55:33","slug":"using-the-agent-webservice-of-the-response-group-service","status":"publish","type":"post","link":"https:\/\/cymbeline.ch\/2009\/03\/19\/using-the-agent-webservice-of-the-response-group-service\/","title":{"rendered":"Using the Agent WebService of the Response Group Service"},"content":{"rendered":"

Your Office Communications Server 2007 R2, Response Group Service deployment comes with a tiny but nice little addition: the Agent WebService. It basically offers exactly the same data and functionality as the Agent OC tab but does this through a SOAP interface. If you have RGS deployed on a pool with the FQDN ‘ocs-pool-01.contoso.com’, you’ll find the Agent OC tab at https:\/\/ocs-pool-01.contoso.com\/Rgs\/Clients\/Tab.aspx<\/a>. The Agent WebService is then located at https:\/\/ocs-pool-01.contoso.com\/Rgs\/Clients\/ProxyService.asmx<\/a>. If you are running the OCS WebComponents on other machines than the front ends, then the host name is the FQDN of the WebComponents machine\/farm. So here’s how you can write your own client to sign in\/out with RGS Agent Groups. The TechNet article Deploying Response Group Clients<\/a> gives more information about deploying RGS Clients, with focus on the Agent OC Tab.<\/p>\n

Generating the Client Proxy<\/h2>\n

The first thing you typically want to do is to actually generate the proxy code which you will compile into your own client. You do so by calling<\/p>\n

\r\nwsdl.exe \/namespace:RgsAgentService \/language:cs \/out:RgsAgentService.cs https:\/\/ocs-pool-01.contoso.com\/Rgs\/Clients\/ProxyService.asmx?wsdl\r\n<\/pre>\n

This will generate the RgsAgentService.cs file which you can include into your project and use right away. Web Services Description Language Tool (Wsdl.exe)<\/a> on MSDN has more info on wsdl.exe if needed.<\/p>\n

Using the Web Service<\/h2>\n

Now you’re already good to go and use the web service. The code below shows a sample console application which does the following.<\/p>\n