Select to view content in your preferred language

Beginner trying to get our map server to work

924
5
09-07-2010 02:17 AM
JamesB
by
Emerging Contributor
I am following the guide
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp/intro_firstmap.ht...

That works, but as soon as I change the Map Server URL to our own map server, we start to get errors:
http://xxx:8399/arcgis/services/UK/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript1._jso...
throws an Apache Tomcat error, HTTP Status 405 - HTTP method GET is not supported by this URL

One thing I'm puzzled by is that our manager seems to be telling us the URL for our map service is actually:
http://xxx:8399/arcgis/services/UK/MapServer?wsdl
Why is the ?wsdl there but not in the sample? Is there a capability we have not turned on we need to?

If I try using that URL it still doesn't work - the call returns XML and nothing happens. I'm quessing from the GET parameters it was excepting some JSON wrapped in a JS function call.
0 Kudos
5 Replies
JamesB
by
Emerging Contributor
I've just noticed the URL we were given to use doesn't have the word rest in - do we have to do anything to get our rest services working?

I've also just tried with version 2.0 of the API
http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jshelp/intro_firstmap.htm
and got the same results

Any help appreciated, thanks!
0 Kudos
AxelSchaefer
Emerging Contributor
You have to access the REST service-endpoint for the JavaScript API. The SOAP (with the WSDL)  endpoint is for the .NET and Java Frameworks and ArcMap.

Take a look at this Services Directory at: http://services.arcgisonline.com/ArcGIS/rest/services and the according Help at http://services.arcgisonline.com/ArcGIS/SDK/REST/index.html

A REST url looks like this: http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer and contains a rest element in the URL.

http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer


A SOAP url looks like this: http://services.arcgisonline.com/ArcGIS/services/World_Street_Map/MapServer?wsdl

http://services.arcgisonline.com/ArcGIS/services/World_Street_Map/MapServer?wsdl


HTH and Bye.
0 Kudos
JamesB
by
Emerging Contributor
Thanks ... we have found the problem - for some reason, the REST services haven't started on our server. We are looking into it ...
0 Kudos
AxelSchaefer
Emerging Contributor
The REST API supports an admin console.

http://services.arcgisonline.com/ArcGIS/SDK/REST/index.html?admin.html

The REST API caches content pertaining to catalogs, services, maps, models, etc. Caching such content allows significant performance impovements while working with the REST API. However, you need to clear this cache when you add services, remove services, update services, or update to a new version of the REST API.


It could be that cache.

Axel
0 Kudos
JamesB
by
Emerging Contributor
Apparently our install of the REST service was broken. We had to re-install the server, and the rest services now seem to be present - I can access the manager interface anyway.
0 Kudos