GetWebServiceUrl

Your Projector account may be hosted on any one of multiple Projector servers. Before consuming web services, it is necessary that your program ascertain the url of the server that hosts your company's data. Therefore, the first thing that your web services code should do is get the correct url by calling the GetWebServiceUrl service. Below is a C# example of retrieving your service url.

Session Tickets

This example assumes that you can create a session ticket. To learn how to create session tickets see C Sharp Example. You must use the v2 web services to generate session tickets. They can be used by the v1 services.


SOAP Connection Example
OpsProjectorSvc svc = new OpsProjectorSvc ();
svc.OpsAuthenticationHeaderValue = new OpsAuthenticationHeader ();
    svc.OpsAuthenticationHeaderValue.AccountName = "(sessionticket)";
    //you can log in using your credentials directly, but we strongly discourage this approach. You should generate session tickets to log in. Direct credentials are fine for some simple tests
    //svc.OpsAuthenticationHeaderValue.AccountName = "(account-name)";
    //svc.OpsAuthenticationHeaderValue.EmailAddress = "(user-name)";
    //svc.OpsAuthenticationHeaderValue.Password = "(password)";
GetWebServiceUrlRq rq = new GetWebServiceUrlRq ();
GetWebServiceUrlRs rs = svc.GetWebServiceUrl (rq);
if (rs.WebServiceUrl != null)
{
    svc.Url = string.Format("{0}/OpsProjectorWebSvc/OpsProjectorSvc.asmx", rs.WebServiceUrl);
}

// Use svc to invoke further web services


Please note that while you can bypass this web service by directly using your company's url - we do not recommend that approach. Using this web service will ensure that your programs will always work, even in the event that your account is moved to a different server.

Request

The service request contains no inputs.

Response


The service returns the following results:

Name

Data Type

Discussion

WebServiceUrl

string

The URL of the server to direct web service calls to. Note that you need to append the location of the web services (/OpsProjectorWebSvc/OpsProjectorSvc.asmx) to this value. This may be null, in which case you do not need to re-point the web services.

Performance

This URL may take as long as a minute to respond on a windows based system that needs to resolve a proxy prior to connecting to the internet. If you are experiencing slow response times, please look into how your application is configured to resolve proxies. You can potentially work around this by adding the following line

System.Net.WebRequest.DefaultWebProxy = null;