Unstable Terrain

Software development in the real world

Posts Tagged ‘proxy

PayFlowAPI Proxy Issues

leave a comment »

At work, we have an old Java 1.4 application that has been experiencing connection issues.

We were experiencing intermittent problems connecting to remote servers. HttpClient logging showed strange connection attempts, like so:

HttpConnectionManager.getConnection:  config = HostConfiguration[host=https://external.site.example.com, proxyHost=http://:0]

These errors persisted even if the proxy details were set programmatically in the Axis2 client. Even setting the http.proxyHost system property didn’t work.

After much investigation, it turns out that the Payflow API jar was (re)setting the system properties for the proxy details based on the input parameters of its constructor — a very unfriendly thing to do. Further investigation showed that this issue was not new. Upgrading jars (or Java version) at this late stage of development was out of the question, so the interim solution was to re-set the proxy details using System.setProperty() each time the API wrecks them. Not ideal, but sufficient.

Written by Trent

April 21, 2010 at 12:35 pm