question

Upvotes
Accepted
1 1 1 2

SOAP request for getDacsUserDefinitionBulk

Hi, I am trying to use a Python script to obtain user info of my DACS site vs WS call. I got the below error back,

<?xml version=\'1.0\' encoding=\'UTF-8\'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getDacsUserDefinitionBulkResponse xmlns:ns2="http://dacsWebService.rfa.reuters.com/"><return><aResult><mResultText>FAILURE</mResultText><mResultCode>1000</mResultCode><mErrorText>Invalid Connection to DACS System</mErrorText></aResult></return></ns2:getDacsUserDefinitionBulkResponse></S:Body></S:Envelope>'

I can not figure out what's wrong in the request. It appeared that WS recognized my request is for "getDacsUserDefinitionBulk". What's that "Invalid Connection to DACS System"?

and my SOAP xml is as followed

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">

<Body>

<getDacsUserDefinitionBulk xmlns="http://dacsWebService.rfa.reuters.com/">

<!-- Optional -->

<loginAttribute xmlns="">

<aAdministratorName>

<mAdministratorName>XXX</mAdministratorName>

</aAdministratorName>

<aAdministratorPassword>

<mAdministratorPassword>YYY</mAdministratorPassword>

</aAdministratorPassword>

</loginAttribute>

<!-- Optional -->

<siteUserList xmlns="">

<mSite>USA</mSite>

<aDacsUserList>

<mDacsUser>zzz</mDacsUser>

<mDacsUser>aaa</mDacsUser>

</aDacsUserList>

</siteUserList>

</getDacsUserDefinitionBulk>

</Body>

</Envelope>

~

DACS
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
32.2k 40 11 19

Hello @allen.chen2 ,

To advise on the specific setup of the local DACS, any additional security requirements, even if the access is http or https, the next point of contact should be the group/admin in charge of your local DACS.

In terms of the API implementation, the example code should work, as works with 7.2 on your side, also works with 7.7 version on my side, and the difference that we went over in admin structure is the only adaption in the client code that should be required between the two.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
32.2k 40 11 19

Hello @allen.chen2 ,

As the error that you observe is "Invalid Connection to DACS System",

I can suggest what would be a quick way to test DACS WS connectivity.

What is your DACS version? If it is 7.7, please see the attached script to test with.getUserListExample.20220614.zip

Replace the below parameters in the script with your local site's valid parameters, prior to the test (you may need to confirm the parameters for connectivity with your local DACS admin, in order to be able to connect to DACS WS):

dacsLogin  = "DACSADMINUSER"
dacsPasswd = "DACSADMINPASSWORD"
dacsWSurl  = "http://DACSSERVER:PORT/DacsWS/DacsWebServiceService?wsdl"
dacsSite = "DACSMYSITE"

If you have 7.5 or older, please also replace:

_dl.aAdministratorName.mAdministratorName         = dacsLogin
_dl.aAdministratorPassword.mAdministratorPassword = dacsPasswd
#_dl.aAdministratorName         = dacsLogin
#_dl.aAdministratorPassword = dacsPasswd

Once you are able to connect and obtain DACS user list, the connectivity to DACS WS is verified and you can next progress to getDacsUserDefinitionBulk request tuning.

Let us know how this works on your side?



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 2

Hi Zoya, thanks for getting back to me. I don't have the privilege to install Suds, so could not test the script you sent me. However, I got the idea from it that 7.2 and 7.7 need different xml tags, and was able to modify to make it work on a 7.2 DACS., which is currently fine but we are going to upgrade all our DACS to 7.7 soon.

I changed my script to do a simple request for "getSiteList", which only needs loginAttribute as input. I got the same error, " Invalid Connection to DACS System" from a 7.7 DACS. What does this error actually mean? with a response code 200, I was actually connecting to the DACS WS, right?


<?xml version="1.0"?>

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">;

<Body>

<getSiteList xmlns="http://dacsWebService.rfa.reuters.com/">;

<!-- Optional -->

<loginAttribute xmlns="">

<aAdministratorName>xxx</aAdministratorName>

<aAdministratorPassword>yyy</aAdministratorPassword>

</loginAttribute>

</getSiteList>

</Body>

</Envelope>

~


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
32.2k 40 11 19

Hello @allen.chen2 ,

I have tested the script against 7.7 testbed, so we know the issue is not with the code.

I would suspect there to be a difference in config of the DACS WS, between 7.2 DACS and 7.7 DACS, and not just the version.

I would suggest to try to understand the difference:

In your browser, type in DACS WS url for 7.2 that you are connecting to succefully:

http://DACSSERVER:PORT/DacsWS/DacsWebServiceService?wsdl

Do you see WSDL?

Next, type in the same, but for 7.7.

Do you still connect successfully and retrieve WSDL? That would help verify the connectivity as you you submit is correct and as configured on the service side.

Let us know how this works on your side?



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 2

Ho Zoya,

I can use the browser to get WSDL from both 7.7 and 7.2. in fact, if I change the python script to use "request.get()" instead of "request.post()", I also get WSDL from 7.7 as well.

The body of WSDL returns look similar, except the JAX-WS versions are different and that in the header part, 7,7 has more in the "definitions"

<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"

which 7.2 does not have these.

the Admin account I have works on both DACS GUI.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 40 11 19

Hello @allen.chen2 ,

I am not finding the same stanza, in our testbed service WSDL, in definitions. BTW, I am testing with http connection, as there are WS installations with https as well.

Just guessing here, there may be additional security provisions installed on your local DACS 7.7, would it make sense to consult with your market data admin/group, they should know if there is an additional security restriction?

Also, perhaps admin/group can be asked to install suds on your local python environment, and this would make your testing much quicker and simpler.

However, I would expect the same security provision to prevent getAttributes from firing with any SOAP access, and the error to be consistent.

For this reason, I would not expect that DACS Station API - Quick Start Guide - Java will be helpful- the same issue should manifest, in my understanding.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 2

Hi Zoya,

I noticed that "Invalid Connection to DACS System" comes from dacs/webUI/apache-tomcat/webapps/DacsWS/WEB-INF/classes/com/reuters/rfa/dacsWebService/DacsResultMake.class.

Is there any way to check in what condition I would get that error.

As for DACS security profile setting, where should I look?

I noticed some difference in the web,xml under dacs/WebUI/apache-tomcat/conf., some settings there exist in 7.7, but not the 7.2 server I have here

<filter>

<filter-name>httpHeaderSecurity</filter-name>

<filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class>

<async-supported>true</async-supported>

<init-param>

<param-name>hstsEnabled</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>hstsMaxAgeSeconds</param-name>

<param-value>31536000</param-value>

</init-param>

<init-param>

<param-name>hstsIncludeSubDomains</param-name>

<param-value>true</param-value>

</init-param>

</filter>

<!-- The mapping for the HTTP header security Filter -->

<filter-mapping>

<filter-name>httpHeaderSecurity</filter-name>

<url-pattern>/*</url-pattern>

<dispatcher>REQUEST</dispatcher>

</filter-mapping>


<security-constraint>

<web-resource-collection>

<web-resource-name>restricted methods</web-resource-name>

<url-pattern>/*</url-pattern>

<http-method>PUT</http-method>

<http-method>DELETE</http-method>

<http-method>OPTIONS</http-method>

<http-method>TRACE</http-method>

</web-resource-collection>

<auth-constraint />

</security-constraint>


I am not sure if these could have affected the things I am trying to do, or if they are defualt settings out of box, or somehow someone at MLP set them.







icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 1 1 2

Commented out the security constraint, and it is working now. Thanks.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.