cancel
Showing results for 
Search instead for 
Did you mean: 

Custom adapter + HTTPDestination + Proxy

Former Member
0 Kudos

Hi Experts,

We are developing a custom adapter at PI 7.1. As part of the specifications, we need to add the option to connect to a target through a proxy server. To do so we found this blog:

After that we added these lines to the adapter:

destination = (HTTPDestination) service.createDestination("HTTP");
destination.setUrl(targetURL);
Properties destinationProperties = this.destination.getDestinationProperties();
destinationProperties.setProperty(HTTPDestination.PROXY_ENABLED, "true");
destinationProperties.setProperty(HTTPDestination.PROXY_URL, "1.2.3.4:8080");
destination.setDestinationProperties(destinationProperties);

In this case, the method getDestinationProperties is marked as deprecated. Do you know wich method I should use to replace the deprecated one?

When we execute this method the connection ignores the proxy and the output is not different.

We also tried this way:

URL proxyURL = new URL("http://" + proxyHost + ":" + proxyPort);
HttpManager.getManager().setProxy(proxyURL );
HttpManager.getManager(url).setProxy(proxyURL );

But the proxy was also ignored.

Does anybody know a different way to use proxy with a httpdestination?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The problem was solved after a configuration from the PI JVM.