I am trying to use the DACS Station Soap API on DACS 7.7. This DACS has been running fine with our RTDS for some time, and I now want to try automate our usage of DACS using Python on Linux. I have looked at the code examples, but when logging in, I get the following error:
from suds.client import Client
url = 'http://localhost:8080/DacsWS/DacsWebServiceService?wsdl';
client = Client(url
l = client.factory.create("dacsAdministratorLogin")
l.aAdministratorName.mAdministratorName = "reuter"
l.aAdministratorPassword.mAdministratorPassword = "<redacted>"
client.service.getDacsAdministratorDefinition(l)
output is
2024-03-19 09:59:24,805 ERROR [suds.client] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://dacsWebService.rfa.reuters.com/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body>
<ns0:getDacsAdministratorDefinition>
<loginAttribute>
<aAdministratorName>
<mAdministratorName>reuter</mAdministratorName>
</aAdministratorName>
<aAdministratorPassword>
<mAdministratorPassword>p_reuter</mAdministratorPassword>
</aAdministratorPassword>
</loginAttribute>
</ns0:getDacsAdministratorDefinition>
</ns1:Body>
</SOAP-ENV:Envelope>
.
.
.
WebFault: b"Server raised fault: 'java.lang.NullPointerException'"
I also tried
l = client.factory.create("dacsAdministratorLogin")
l.aAdministratorName = "reuter"
l.aAdministratorPassword = "<redacted>"
client.service.getDacsAdministratorDefinition(l).aResult.mErrorText
which gets further as we don't get a 500, but we this returns `Invalid Administrator Name`
I made sure that within DACS, that I have checked the "Enable Web Service Usage" (see attached screenshot).
Does anyone have any pointers on how I can get this working? I am using Suds 1.4.5 on Python 3.8. Thanks in advance.