Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to setup proxy settings in SWT application

 
gopi dasaraju
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an SWT touchscreen application up and running remotely. Application interacts with the back-end server thru webservices.

Now for few terminals, we need to set proxy for client application to interact with the back-end server.

Currently, we are using direct calls to webservice [not thru proxy]

I need some examples, how to implement this proxy settings.

Ideas on this implementation will greatly help.

Thanks in advance.
 
gopi dasaraju
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i found this code some articals but this works only at JVM level,it's not working axis request and responses.

public void methodName(Map<String, String> proxyMap){
Properties props= new Properties(System.getProperties());
props.put("http.proxySet", "true");
props.put("http.proxyHost", proxyMap.get("proxyHost"));
props.put("http.proxyPort", proxyMap.get("proxyPort"));
Properties newprops = new Properties(props);
System.setProperties(newprops);
}

thanks,
Gopi Dasaraju.
[ May 22, 2008: Message edited by: gopi dasaraju ]
 
gopi dasaraju
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally i found the solution..

public void addProxy(Stub stub){
Options options = stub._getServiceClient().getOptions();
HttpTransportProperties.ProxyProperties proxyProperties = new HttpTransportProperties.ProxyProperties();
proxyProperties.setProxyName("hosturl");
proxyProperties.setProxyPort(number);
options.setProperty(HTTPConstants.PROXY, proxyProperties);

}
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic