Im testing the XML SOAP with a simple SQL Query, however Im not sure if Im using the correct syntax because i cant see the data and the software prompt some errors.
The software used is SOAPUI 5.6
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:scx6="http://serck-controls.com/webservices/SCX6/">
<soapenv:Header/>
<soapenv:Body>
<scx6:ExecuteQuery>
<scx6:SQL>SELECT TOP(5) FULLNAME FROM CDBPOINT</scx6:SQL>
</scx6:ExecuteQuery>
</soapenv:Body>
</soapenv:Envelope>
The connection configured is http://localhost:85/webservices/scx
I think your endpoint URL is wrong.
http://localhost:85/webservices/scx
I think this should most likely just be:
http://localhost/webservices/scx
IIF you allow insecure HTTP... otherwise you could go with https://localhost/webservices/scx
The reason I think 85 is wrong is that if you installed the 'new' (old) IIS-based WebX then it will also install itself at port 85, and this will conflict with your ClearSCADA WebX which defaults to port 80, but which you say you have configured as port 85.
Hello bevan
I changed the port for webX to 80 and checked the option for insecure http from the server configuration, but the software still prompt errors.
Could be the syntax?
I'd recommend that you start with something a bit more structured before you go hand creating the SOAP requests
I believe that you could even directly import in the Web Service references if you're using a recent version of Visual Studio, and your Visual Studio environment has access to the ClearSCADA (or Geo SCADA Expert) server.
Then once you have something working, you could use wireshark or similar to snoop on the traffic to get the structure of the requests / responses.
I think you should also go back to first principles with your fault finding. You say 'the software still prompts errors'... that means literally nothing. Does this error say 'Buy a licence to use this software'??.. because if so, maybe you solve the problem by buying a licence to use the software... (SOAP UI is free-to-use software.. so I suspect it's not this, but you also clearly haven't told us either way..)
So start from the beginning, things like
Answer to your questions
So start from the beginning, things like
I tried with the code below. I can execute the query when the database is accesible by the guest user, when i configure the security, even using the object System.Net.NetworkCredential, the query is null.
object[] obj;
SOAPconsole.localhost.SCXService MySoap;
MySoap = new SOAPconsole.localhost.SCXService();
MySoap.Url = "http://localhost/webservices/scx";
System.Net.NetworkCredential userDefined = new System.Net.NetworkCredential("User","Password");
MySoap.Credentials = userDefined;
try {
obj = new object[0];
bool limit;
bool size;
object[][] retobj;
retobj = MySoap.ExecuteQuery("Select fullname from CDBObject", obj, out limit, out size);
Console.WriteLine("Query executed. Number of elements polled: " + retobj.Length);
for (int i = 0; i < retobj.Length; i++)
Console.WriteLine(retobj[i][0].ToString());
}
catch (Exception ex) {
Console.WriteLine(ex.Message);
}
Console.ReadLine();
What does Wireshark say when you look at the traffic?
I suspect that your authentication isn't working.
I doubt that ClearSCADA will return a 401 'Authorization Request', since technically for that URL the Guest user (i.e. no authentication user) does have certain authorization, just typically it will be so low that it's meaningless (i.e. no visibility/browse permissions for any objects).
You probably just want to force the authentication elements into the request header rather than trying to use the NetworkCredentials.
User | Count |
---|---|
188 | |
52 | |
16 | |
16 | |
15 |
Discuss challenges in energy and automation with 30,000+ experts and peers.
Find answers in 10,000+ support articles to help solve your product and business challenges.
Find peer based solutions to your questions. Provide answers for fellow community members!