Closed andreabono closed 1 year ago
Underlying issue seems to be that ws.resif.fr does a 301 redirect to https://api.franceseisme.fr and the http client is failing to handle the https verification stuff correctly. Actually, I think ssl is disabled by default.
Also another issue, maybe the real one, is that ws.resif.fr returns a 406 if the Accept header is "application/xml". I feel like this is a bug in their server, but a workaround would be to
FDSNEventQuerier querier = new FDSNEventQuerier(queryParams);
querier.setAcceptHeader("*/*");
You can see this with curl. This fails with a 406:
curl -v -L -H "Accept: application/xml" -o data.quakeml 'http://ws.resif.fr:80/fdsnws/event/1/query?endtime=2023-05-02T23:59:59.999Z&minmagnitude=-2.0&orderby=time-asc&starttime=2023-05-02T00:00:00.000Z'
but this succeeds:
curl -v -L -H "Accept: */*" -o data.quakeml 'http://ws.resif.fr:80/fdsnws/event/1/query?endtime=2023-05-02T23:59:59.999Z&minmagnitude=-2.0&orderby=time-asc&starttime=2023-05-02T00:00:00.000Z'
I will attempt to contact them to see if they will allow application/xml
.
Issue created with RESIF here: https://gitlab.com/resif/sismo-help/-/issues/127
Closing this as I believe either the workaround or RESIF fixing the server resolves this. Let me know if you are still having trouble.
Great, I'll be waiting for the new release!!. Thanks a lot!!
Resif has fixed their server to allow the Accept header.
I've a issue running the following code:
The ERROR HERE line raises an edu.sc.seis.seisFile.fdsnws.FDSNWSException: Code: 406 Not Acceptable when running on the following parameters:
http://ws.resif.fr:80/fdsnws/event/1/query?endtime=2023-05-02T23:59:59.000Z&maxdepth=1000.0&minmagnitude=-2.0&orderby=time-asc&starttime=2023-05-02T00:00:00.000Z
Here follows the stack trace: