SOAP web service ConnectionInfo


There is an operation in the SOAP web service called ConnectionInfo.  In recent versions this has been deprecated there is, however, an alternative.  The purpose of ConnectionInfo is to return information about the currently connected user, this is now discoverable via the ObjectStringSearchSelect.

How to get the current connection

The C# code below demonstrates using the ObjectStringSearchSelect operation to find the current user and fetch their Uri.  Of course the Fetch could also be used to retrieve any other Location property.

TrimRequest request = new TrimRequest();

ObjectStringSearchSelect stringSearch = new ObjectStringSearchSelect();
stringSearch.TrimObjectType = "location";
stringSearch.Search = "me";

request.Items = new Operation[] { stringSearch, new Fetch() };

Engine engine = new Engine();
engine.UseDefaultCredentials = true;

TrimResponse response = engine.Execute(request);

foreach (Result res in response.Items)
    switch (res.GetType().Name)
        case "FetchResult":
            FetchResult fetchResult = res as FetchResult;
            if (fetchResult.Objects.Length > 0)
        case "ErrorResult":
            ErrorResult errorResult = res as ErrorResult;

Show me the SOAP

Below is the SOAP request to search for the Location 'me'.  Also required is a Fetch operation to return the Location Uri.

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
        <Execute xmlns="">

SOAP web service remote troubleshooting

Testing the connection

While it is possible to test the web service via a browser it is only possible to do this from the actual server machine.  If you are not able to connect directly to the server you may wish to use this simple app to check if the web service is actually running and that you can authenticate.  You can experiment with authentication and might see an error like this:

WS Error Message

If you connect successfully you will see a response including the connected user name, like this:

Using WS Test

To use this test app simply:

  1. download the test app,
  2. unzip the contained files into a folder on your computer,
  3. run WsTest.exe,
  4. enter the URL for your web service,
  5. either choose Default Credentials or enter your user name, domain and password (domain optional), then
  6. press Go.