Disabling REST and SOAP services in ArcGIS Server 9.3
The REST (Representational State Transfer) interface to ArcGIS Server was something that was added new in 9.3. But the SOAP interface to ArcGIS Server was available in the 9.2 versions and helped developers avoid the pitfalls of the Web ADF in 9.2. The WSDL for the SOAP services could be accessed at
http://MachineName/arcgis/services/MapServiceName/MapServer?wsdl
And the REST services could be accessed at
http://MachineName/arcgis/services/MapServiceName/MapServer (html)
or
http://MachineName/arcgis/services/MapServiceName/MapServer?f=json&pretty=true (json)
The SOAP access to services hosted by ArcGIS Server can be disabled through ArcCatalog. The following screenshots show how that can be done.
or
The REST service keeps chugging along even when the SOAP service is disabled. The “Services Directory” (available at http://MachineName/arcgis/services/MapServiceName/MapServers) entry for the map service still displays a link to the SOAP interface as shown below. But the link will be broken and you will receive an HTTP 404 error if you try to access the WSDL with the SOAP services disabled. The link displayed here seems to be constructed from the “SoapUrl” element value in the “C:\inetpub\wwwroot\ArcGIS\rest\rest.config” file.
The URL to the SOAP endpoint is not available in the JSON output from http://MachineName/arcgis/services/MapServiceName/MapServer?f=json&pretty=true. That would have been handy.
I haven’t come across any documented way of turning off the REST web services. But this can be done pretty easily by taking advantage of one of the lesser known ASP.NET 2.0 features and creating an empty file called “App_Offline.htm” file in the “C:\inetpub\wwwroot\ArcGIS\rest” directory. Creating the empty in that directory should disable the REST services while still having ArcGIS and the SOAP interfaces running.
Follow Me
Contact me
After you disable web access you need to clear your rest cache (see here). Once the rest cache has been cleared you won’t have access to that service.
Jeremy
Vish,
Go into the REST Admin tools, (http://MachineName/ArcGIS/rest/admin), Services Directory Options, and Disable Services Directory.
Cheers & Hope VA is treating you well!
Dave
Disabling Services Directory disables the html format, not the actual service. REST is still accessible, but not publicized via html.
If Services Directory is not accessible:
http://myserver/arcgis/rest/services fails
http://myserver/arcgis/rest/services?f=html fails
http://myserver/arcgis/rest/services?f=json works as normal
Jeremy
Jeremy,
Thanks for that information. Do you know the reasoning behind just disabling the HTML and not the JSON? Doesn’t seem to be too useful…
Vish
Do you know the reasoning behind just disabling the HTML and not the JSON?
You as a server administrator may want to access your restful services, but you don’t want your server to be searchable from search engines. You want to use your server but you don’t want to publicize that your server is accessible to others. Of you just want to remove rest completely you can remove the REST application folder from IIS.
Jeremy