private IGeoDataServer InitGeoDataServerFromNetworkServer(String machineName, String
serviceName)
{
// Create a property set for connection properties.
IPropertySet propertySet = new PropertySetClass();
//propertySet.SetProperty("Machine", machineName);
propertySet.SetProperty("user", @"domain\mapuser");
propertySet.SetProperty("password", "1234");
propertySet.SetProperty("CONNECTIONTYPE", "esriConnectionTypeInternet");
propertySet.SetProperty("URL", "http://server/arcgis/rest/services/");
// Connect to the server and get an enumerator for its objects.
IAGSServerConnectionFactory agsServerConnectionFactory = new
AGSServerConnectionFactoryClass();
IAGSServerConnection agsServerConnection = agsServerConnectionFactory.Open
(propertySet, 0);
IAGSEnumServerObjectName enumServerObjectName =
agsServerConnection.ServerObjectNames;
enumServerObjectName.Reset();
// Iterate through the objects to locate the GeoData service.
IAGSServerObjectName serverObjectName = null;
IGeoDataServer geoDataServer = null;
while ((serverObjectName = enumServerObjectName.Next()) != null)
{
if (serverObjectName.Name == serviceName)
{
IName name = (IName)serverObjectName;
geoDataServer = (IGeoDataServer)name.Open();
break;
}
}
return geoDataServer;
}Erin,
Thanks for the links. I think this will very useful. I did not know about the SOAP Proxy Libraries so I appreciate you showing me these.
I would have responded earlier but could not find this post now that it is on GeoNet ![]()
Mele