The account used to connect to your installation must have the Export Data permission enabled.
C#
This example will retrieve the number of resources in your installation.
Project
This example was tested with Visual Studio 2012. The project is a console application.
Add Web Reference
You'll need to add a web reference to Projector's WSDL. You can do so by right-clicking References in the solution explorer and choosing Add Service Reference.
Enter the WSDL address and name the reference.
Once the reference is added, the following code should execute (with proper authentication information):
using System.ServiceModel; using ProjectorExampleWS1.ServiceReference1; namespace ProjectorExampleWS1 { class Program { static void Main(string[] args) { //create an instance of the Projector Service var svc = new OpsProjectorSvcSoapClient(); var header = new OpsAuthenticationHeader { AccountName = "youraccount", EmailAddress = "youremail", Password = "yourpassword" }; //Authenticate with server and ensure we have the correct Service URL var getWebServiceUrlRq = new GetWebServiceUrlRq(); GetWebServiceUrlRs getWebServiceUrlRs = svc.GetWebServiceUrl(header, getWebServiceUrlRq); if (getWebServiceUrlRs.WebServiceUrl != null) { svc.Endpoint.Address = new EndpointAddress(string.Format("{0}/OpsProjectorWebSvc/OpsProjectorSvc.asmx", getWebServiceUrlRs.WebServiceUrl)); ; } //Retrieve some data from the installation using Rq/Rs var exportResourcesRq = new ExportResourcesRq { Parameters = new ExportResourcesRequest { OnlyCountRows = true } }; ExportResourcesRs exportResourcesRs = svc.ExportResources(header, exportResourcesRq); int iResources = exportResourcesRs.Data.RowCount; } } }