Getting List of services

570
4
03-16-2011 01:46 PM
BrianGustafson
New Contributor III
Is there a way to get a list of services inside of a specified folder?  I want to get a list of services in a folder and then use that to populate a combo box so that the users can pick which services that they want to add to the map.
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Is there a way to get a list of services inside of a specified folder?

You can get this list by requesting the folder url and by deserializing the result.
For example http://services.arcgisonline.com/ArcGIS/rest/services/Demographics?f=pjson is giving the list of services under the Demographics folder.
Here's some documentation on the metadata provided by the ServiceDirectory http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/servicesdirectory.html
0 Kudos
SanajyJadhav
Occasional Contributor II
Can you elaborate the issue please?

As per my understanding, you want to access some folder on your ArcGIS Server and add the service names to combo box in the SilverLight. Correct me if I am wrong.

If that is the case, one option could be to use WCF and access ArcObjects.It would give you list of all map services in a specified folder.

Cheers,
Sanjay.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Hi Sanjay,

Looks like we answered almost at the same time.

You are right, using WCF and ArcObjects is also an option but using the REST API should be easier.
0 Kudos
BrianGustafson
New Contributor III
This is what I was looking for.  Thanks.
0 Kudos