📖Home You can connect to Geo SCADA using SOAP via the web ports on the server. This example shows how to access database items and modify the item properties using the SOAP interface from Visual Studio and C#.
First create a new project, select C# among languages and the Windows application type. In our example we used SoapClnt as a project name.
Note that this example uses the Guest user and does not log in. Logging in will require a web page request prior to using SOAP, and all the returned login cookies (CLEARSCADAUSERID and CLEARSCADASECUREUSERID) must be used in subsequent requests. The HTTP POST should request the page "/logon" and send the content "user=<username>&password=<password>" (omit quotes and angle brackets.
Then add web reference to the project, this should be
Use the same SERVER name and port number that is used for WebX access.
Add a name to the reference, in our example we used WebRefSCX. (There is another reference available which could be used in similar way.)
Then create a connection to database by creating a new class of SCXService:
...SoapClnt.WebRefSCX.SCXService MySoap; MySoap = new SoapClnt.WebRefSCX.SCXService ();...
The newly created class is ready to connect to the same server you used for the reference, if you want to connect to another server, you need to overwrite the URL property.
That is all you need to access data using ExecuteQuery service.
obj = new object; bool limit; object retobj; retobj = MySoap.ExecuteQuery("Select FullName from CDBPoint", obj, out limit); for (int i = 0; i < retobj.Length; i++) PointList.Items.Add(retobj[i].ToString());
Then you can use ExecuteMethod service to be executed on any database object. In our sample we use CurrentValue method to set a new value to internal analog point.