For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
20 3 2 6

TRKD Websockets API unresolved reference MarketPriceAuthentication.java (Options addOption())

I am trying one of the sample streaming examples in Java from the TR Dev Portal with TRKD using websockets for streaming data. I seem to be missing a jar file to satisfy the reference to a couple of classes, which I think should be in cli-commons.jar. However, adding this to the build path (in Eclipse) does not help. The lines of source with unresolved references are pasted below. The particular example I am trying to run is MarketPriceAuthentication.java, but the unresolved references apply to all the java examples.

form the Websocket API downloads here:

https://developers.thomsonreuters.com/elektron/websocket-api/downloads

The unresolved references are (in all the Java examples): lines 53-61

options.addOption(Option.builder().longOpt("hostname").hasArg().desc("hostname").build());

options.addOption(Option.builder().longOpt("port").hasArg().desc("port").build()); options.addOption(Option.builder().longOpt("app_id").hasArg().desc("app_id").build()); options.addOption(Option.builder().longOpt("user").hasArg().desc("user").build()); options.addOption(Option.builder().longOpt("position").hasArg().desc("position").build()); options.addOption(Option.builder().longOpt("password").hasArg().desc("password").build()); options.addOption(Option.builder().longOpt("auth_hostname").hasArg().desc("auth_hostname").build()); options.addOption(Option.builder().longOpt("auth_port").hasArg().desc("auth_port").build()); options.addOption(Option.builder().longOpt("help").desc("help").build());

And in MarketPriceAuthentication.java: lines 114, 115

builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());

SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE);

treprdp-apiwebsocketsrrtorkd-api
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.

1 Answer

· Write an Answer
Upvotes
Accepted
22.5k 59 14 21

@mark.ringrose - TRKD is a different product and not related to the Elektron Websocket API, that you are referring to here. I am moving this question into appropriate category.

To compile the Java samples, look at ivy.xml file for a list of dependencies, or use ivy package manager to download and manage it automatically.

In my machine, I have following jar files in the classpath to compile and run:

commons-cli-1.4.jar
commons-logging-1.2.jar
httpclient-4.5.3.jar
httpcore-4.4.6.jar
json-20140107.jar
nv-websocket-client-2.3.jar
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.