Consume Geoprocessing Service in ArcObjects Project

554
2
11-26-2013 11:29 AM
olivermcrobbie
New Contributor
I need to call a "clip and ship" geoprocessing web service via arcobjects.  The input parameter is a feature (to define an area of interest).  The gp service requires a user name and password to connect.  Are there any resources available that touch on how to do this?  Thanks
0 Kudos
2 Replies
SachinKanaujia
Occasional Contributor III
0 Kudos
olivermcrobbie
New Contributor
Thank you for your reply Sachin.

I guess the only thing I am unclear about is connecting to the gp service using credentials. 
I did find this snipnet:
ESRI.ArcGIS.ADF.Identity identity = new ESRI.ArcGIS.ADF.Identity("user", "passwd", "domain");
ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection ags_connection;
agsconnection = new ESRI.ArcGIS.ADF.Connection.AGS.AGSServerConnection("hostname", identity);
agsconnection.Connect();
IServerObjectManager som = agsconnection.ServerObjectManager;


Other option:
Reading the api reference, I see that the geoprocessor constructor can take an IServerContext object.  Can I pass my credentials to the server context object?  It says the context object is a dictionary.  Is the server looking for specific keys? (ie., "username", "password") 

I have not been able to find a sample demonstrating connecting to a gp service using credentials. 

Thanks in advance.
0 Kudos