on 04-28-2011 8:46 PM
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?
The problem was solved after a configuration from the PI JVM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.