• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to setup proxy settings in SWT application

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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);

}
reply
    Bookmark Topic Watch Topic
  • New Topic