jimmoores / quandl4j

Java wrapper for Quandl REST API

Home Page:quandl4j.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quandl4J 1.1.0 and HTTPS requirement

capalbc opened this issue · comments

I just a spent a couple of days investigating why Quandl4J 1.1.0 works with Jersey and didn't work with CXF. It turns out the base URI in Quandl4J is "quandl.com", however the Quandl servers SSL/TLS certificate is on "www.quandl.com" so the server redirects there. Jersey seems to auto-redirect, while CXF by default does not auto-direct resulting in a 301 HTTP response. Please update the code so that the base URI is "https://www.quandl.com/api/v1" rather than "https://quandl.com/api/v1" as this is the actual secure URL.

As a work-around CXF users can use the following config to get Quandl4J to work with the CXF JAX-RS provider:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:http="http://cxf.apache.org/transports/http/configuration"
    xmlns:sec="http://cxf.apache.org/configuration/security"
    xsi:schemaLocation="http://cxf.apache.org/transports/http/configuration
           http://cxf.apache.org/schemas/configuration/http-conf.xsd
           http://cxf.apache.org/configuration/security
           http://cxf.apache.org/schemas/configuration/security.xsd
           http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans.xsd">

    <http:conduit name="https://quandl.com/.*">
        <http:client AutoRedirect="true" Connection="Keep-Alive"/>
    </http:conduit>

</beans>

I've now released 1.2.0 to maven central which should address the issue. Would you mind if I added a note in the contributors list that you helped identify the bug?

Oh wonderful, thanks for keeping me posted!  Sure, no problem on the contributors list note.  Thanks again for creating Quandl4J and as I understand it helping to create OpenGamma as well!  I look forward to any contributions, however small, I can make in the future.
cheers,--Lawrence

 On Tuesday, June 30, 2015 9:10 AM, Jim Moores <notifications@github.com> wrote:

I've now released 1.2.0 to maven central which should address the issue. Would you mind if I added a note in the contributors list that you helped identify the bug?—
Reply to this email directly or view it on GitHub.