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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 2 3 4

Java Code Examples not working | java.net.UnknownHostException

Hi,

I just download "Java Code Examples" and I try to run it on my eclipse with

jdk8 and my user/login datascope.

But when I try to run this program I have this error :

java.net.UnknownHostException: hosted.datascopeapi.reuters.com

On internet explorer I can access to it, but when I ping in windows prompt I have host unknow.

How can I do?

Do I have to ask changes for proxy/dns at my work place?

Please help.

David LY.

dss-rest-apidatascope-selectdssjavaerror
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.

Upvotes
Accepted
13k 32 12 18

@davly182

From the description, it looks like your machine is behind a proxy/firewall.

You will have to modify the DSS sample to allow for the proxy server -- something like:

HttpHost proxy = new HttpHost(proxy_ip_address, proxy_port);
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);

See Apache HTTP client for more information.

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.

Upvotes
1.5k 3 5 7

It means your Java application cannot resolve "hosted.datascopeapi.reuters.com" into an IP address. It doesn't mean the address cannot be accessed, it means it cannot be resolved. Can you do a successful resolve from Windows command prompt:

nslookup hosted.datascopeapi.reuters.com

??

On my machine it returns the IP : 192.165.219.152.

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.

Upvotes
1 2 3 4

Thanks Lars-at-Addicticks and Gurpreet.

no IP for the commande, and I'm not administrator of my computer.

I contacted my workplace to resolve it.

thanks.

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