How to use proxy for accesssing ArcWeb Services

Web services are always fascinating to me. Today, web technologies occupies predominent role in GIS industry. In this context, Web Services plays vital role. This post discuss about how to access and use map services as web services locally and through internet. 

  1. How to access ArcWeb Services with C#.NET using Microsoft Visual Studio 2005 
  2. Viewing Map Services hosted in GIS Server in a local machine through desktop client.

Here is the sample from ESRI website ArcWebServices is attached as html file [code] for consuming ArcWeb service. The sample program clearly explains how to consume ‘AddressFinder’ service from ArcWebServices website.  This services returns x, y information of address you enter. Follow the instructions given in the sample. You need an ESRI login account for using services.When you build sample application, you may come across webexception if your application is behind the firewall.  You can resolve this issue by adding below code in attached sample

·         Include System.Net namespace in the application.

·         Create  proxy object using Web Proxy class and pass the Proxy IP with port. Provide your system username and password and domain. Finally set this proxy to Authentication proxy and addressfinder proxy      

System.Net.WebProxy myProxy = new System.Net.WebProxy(http://ip:port/”, true);

myProxy.Credentials = new System.Net.NetworkCredential(“SystemUserName”, “SystemPassword”, “Domain”);

// Create an instance of Authentication.

Au.Authentication authentication = new Au.Authentication();

//Set proxy for authentication object

authentication.Proxy = myProxy;

// Create an instance of AddressFinder.

 Af.AddressFinder addressFinder = new Af.AddressFinder();

//Set proxy for addressFinder object

  addressFinder.Proxy = myProxy;

Test the console application with this webservice http://mesaarcweb.esri.com/livesamples/v2/addressfinder/index.jsp

Here is sample for viewing MapServices running local host through deskop client.

Advertisements

One Response to “How to use proxy for accesssing ArcWeb Services”

  1. arcobjects material Says:

    please give me the guidence, how can i learn the arcobjects.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: