Unable to successfully login to DACS Station SOAP API via Python Suds 1.4.5

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.
Best Answer
-
Thank you for reaching out to us.
I checked the DACS Web Sevices Programmer's Guide and found that the getDacsAdministratorDefinition method requires two parameters.
The code should look like this:
_dl = client.factory.create('dacsAdministratorLogin')
_dl.aAdministratorName.mAdministratorName = dacsLogin
_dl.aAdministratorPassword.mAdministratorPassword = dacsPasswd
_dn = client.factory.create('dacsAdministratorName')
_dn.mAdministratorName = "reuter"
_adminDef = client.service.getDacsAdministratorDefinition(_dl, _dn)
print(_adminDef)0
Answers
-
Thanks @Jirapongse. I have updated my code but I am still getting the same NullPointerException error. The transmitted XML is:
2024-03-20 08:34:16,983 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>redacted</mAdministratorPassword>
</aAdministratorPassword>
</loginAttribute>
<adminName>
<mAdministratorName>reuter</mAdministratorName>
</adminName>
</ns0:getDacsAdministratorDefinition>
</ns1:Body>
</SOAP-ENV:Envelope>0 -
I tested the request on SOAP UI and it works fine.
You can contact the DACS support team directly to verify if the DACS WS is working properly.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛