javaproxyrallylookbackapi

Rally Java lookback api do not work behind Proxy


I'm trying to use Rally Lookback Java API and it throws exception saying

com.rallydev.lookback.LookbackException: org.apache.http.conn.HttpHostConnectException:       Connection to https://rally1.rallydev.com refused
at com.rallydev.lookback.LookbackQuery.execute(LookbackQuery.java:61)

I could figure out that this error was due to Inaccessibility to rally server due to corporate proxy setup.

Unlike rally rest API which gives setProxy() method to set proxy server which works for me, there is no provision for Lookback API to set proxy and throws this error.

I'm trying this out on windows machine,and expecting any workaround or solution for the same platform.

Thanks, Sagar


Solution

  • I have forked the repo and have made some changes. I have an open pull request that will be reviewed shortly and then we'll get it pushed to the main repo.

    Here's a link to the branch.

    https://github.com/trevershick/Rally-Lookback-Toolkit/tree/S72258

    If you want to clone that repo and 'mvn package' the source it will generate a .jar file for you that you can use. It's the same interface as the one you're probably using now but has setProxyServer and setProxyCredentials for authenticating against a proxy server via basic auth. If you cannot use basic auth to authenticate against the proxy server then you may need to inject your own instance of DefaultHttpClient (see the Readme). You should be able to add for example an Ntlm Credentials object to the Credentials provider if necessary.

    Fee free to ask any questions you may have and i'll update this answer once I get the PR merged in.