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.
- How to access ArcWeb Services with C#.NET using Microsoft Visual Studio 2005
- 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