amattioc / SDMX

SDMX Connectors
European Union Public License 1.2
85 stars 46 forks source link

Java OECD client returns HTTP error 400 #45

Closed kejml closed 9 years ago

kejml commented 9 years ago

I was testing your Java components, but it seems to me OECD client doesn't work. I tried this simple request:

try {
    GenericSDMXClient client = SDMXClientFactory.createClient("OECD");
    client.getDataflows();
} catch (SdmxException e) {
    e.printStackTrace();
}

and I got

III 18, 2015 10:39:39 DOP. it.bancaditalia.oss.sdmx.client.RestSdmxClient runQuery
INFO: Contacting web service with query: http://stats.oecd.org/restsdmx/sdmx.ashx//GetDataStructure/ALL
III 18, 2015 10:39:39 DOP. it.bancaditalia.oss.sdmx.client.RestSdmxClient runQuery
SEVERE: Connection failed. HTTP error code : 400, message: Bad Request
SDMX meaning: there is a problem with the syntax of the query
it.bancaditalia.oss.sdmx.util.SdmxException: Connection failed. HTTP error code : 400, message: Bad Request
SDMX meaning: there is a problem with the syntax of the query
    at it.bancaditalia.oss.sdmx.client.RestSdmxClient.runQuery(RestSdmxClient.java:288)
    at it.bancaditalia.oss.sdmx.client.custom.DotStat.getDataflows(DotStat.java:109)
    at eu.keyup.kejml.sdmx.App.main(App.java:14)
amattioc commented 9 years ago

You are right, there seems to be a problem in the OECD provider with the call for retrieving all the structures (http://stats.oecd.org/restsdmx/sdmx.ashx//GetDataStructure/ALL). I think it started some days ago. I already sent a mail to the OECD.stat support for this.

I'll keep you posted.

PS: If you want to continue testing the provider, the other calls work fine. As a reference you can try the calls in the OECD unit test: https://github.com/amattioc/SDMX/blob/master/JAVA/test/it/bancaditalia/oss/sdmx/ut/OECDTest.java

amattioc commented 9 years ago

Hi @kejml I received an update from the oecd support. The problem is goin to be fixed soon.

amattioc commented 9 years ago

The problem has been fixed by OECD.