How To: Use a proxy server with GLUE applications
If the network uses a proxy server, add a few lines of code to the GLUE applications for them to successfully communicate with ArcWeb Services.
Use the following procedure to access any ArcWeb service. For this article, PlaceFinderSample is an example service. Be sure to replace "PlaceFinderSample" with your ArcWeb service name when applying this procedure.
- Search for this line of code:
IPlaceFinderSample placeFinderSample = PlaceFinderSampleHelper.bind();
- Replace it with these lines of code:
electric.glue.context.ProxyContext context = new electric.glue.context.ProxyContext();
context.setProxy( "proxyserver", "proxyport", "proxyUser", "proxyPassword" );
// bind to regular web service at specified URL with proxy context.
String pfsurl = "http://www.arcwebservices.com/services/v2006_1/glue/PlaceFinderSample.wsdl";
IPlaceFinderSample placeFinderSample = (IPlaceFinderSample) electric.registry.Registry.bind( pfsurl, IPlaceFinderSample.class, context );
If you don't have a proxy user name and password, leave the fields empty.