For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
21 1 0 2

I couldn't connect to DSS with DSS REST API

DSS Endpoint: https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken

DSS IP: 164.57.211.94


I could connect to DSS and get token with Postman via REST API .

But I couldn't get token via the DSS2Token example offered by Refinitiv. Under JDK 1.7 and JDK 1.8, it outputted error messenger:

main, handling exception: java.net.SocketException: Connection reset

%% Invalidated: [Session-4, SSL_NULL_WITH_NULL_NULL]

main, SEND TLSv1.2 ALERT: fatal, description = unexpected_message

main, WRITE: TLSv1.2 Alert, length = 2

main, Exception sending alert: java.net.SocketException: Connection reset by peer: socket write error

main, called closeSocket()


At the same time, I couldn't got any response from DSS with curl:

curl -v -H 'Content-Type:application/json' -XPOST https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken

it outputted:

* About to connect() to hosted.datascopeapi.reuters.com port 443 (#0)

* Trying 164.57.211.94...

* Connected to hosted.datascopeapi.reuters.com (164.57.211.94) port 443 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

* CAfile: /etc/pki/tls/certs/ca-bundle.crt

CApath: none

* NSS error -5961 (PR_CONNECT_RESET_ERROR)

* TCP connection reset by peer

* Closing connection 0

curl: (35) TCP connection reset by peer


Howover, I could access the rebranded DSS with curl, as following:

curl -v -H 'Content-Type:application/json' -XPOST https://selectapi.datascope.refinitiv.com/RestApi/v1/Authentication/RequestToken


I tried many ways to connect to DSS, but it still didn't work.

Please tell me how to connect to DSS(hosted.datascopeapi.reuters.com) via REST API by Java


DSS2Token.zip

dss-rest-apidatascope-selectdss
dss2token.zip (1.2 KiB)
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
38.1k 71 35 53

@yujin.xu11

I can run it properly with the CURL command and DSS2Token Java example.

curl -H "Content-Type: application/json" -H "Prefer: respond-async" -X POST -v -d "{\"Credentials\": {\"Username\": \"username\",\"Password\": \"password\"}}" https://hosted.datascopeapi.reuters.com/RestApi/v1/Authentication/RequestToken

The output is output.txt. I am using curl 7.53.1.

For Java, I use the following commands to build and run the example.

C:\Java\DSS2_Java_Examples\src\com\refinitiv\dss\api\example>"c:\Program Files\Java\jdk1.8.0_261\bin\javac.exe" DSS2Token.java -classpath "C:\Java\DSS2_Java_Examples\src;C:\Java\DSS2_Java_Examples\lib\commons-codec-1.9.jar;C:\Java\DSS2_Java_Examples\lib\commons-logging-1.2.jar;C:\Java\DSS2_Java_Examples\lib\httpclient-4.5.3.jar;C:\Java\DSS2_Java_Examples\lib\httpcore-4.4.6.jar"

C:\Java\DSS2_Java_Examples\src\com\refinitiv\dss\api\example>"c:\Program Files\Java\jdk1.8.0_261\bin\java.exe" -classpath "C:\Java\DSS2_Java_Examples\src;C:\Java\DSS2_Java_Examples\lib\commons-codec-1.9.jar;C:\Java\DSS2_Java_Examples\lib\commons-logging-1.2.jar;C:\Java\DSS2_Java_Examples\lib\httpclient-4.5.3.jar;C:\Java\DSS2_Java_Examples\lib\httpcore-4.4.6.jar" com.refinitiv.dss.api.example.DSS2Token <username> <password>
Session Token (expires in 24 hours):
<token>

output.txt (2.5 KiB)
icon clock
10 |1500

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

Click below to post an Idea Post Idea