When making a GetCapabilities request from ArcGis Desktop, how does it get the information needed for making the GetMap request and how is the GetMap request handled by their "sample server"?
For example (taken from their own resource center http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005300000046000000):
If I use their own sample server and make the following GetCapabilities request:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetCapabilities&service=WMS
But how does it get the information needed for making the following GetMap request?:
http:/sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetMap&CRS=CRS:84&bbox=-178.217598,18.924782,-66.969271,71.406235&width=760&height=360&layers=0&styles=default&format=image/png
Is it only taken from the GetCapabilities response XML or am I missing something here? It's difficult for me to understand how ArcGis Desktop creates the GetMap request and receives the images when I'm only inputting the GetCapabilities request. Is there some documentation I'm missing somewhere? And is there some kind of guideline as to how their "sample server" might be handling the incoming requests?
Best Answer
GetMap URL is automatically built using the response of GetCapabilities.
Here you see, where do GetMap parameteres come from in the GetCapabilities Xml Document:
styles=default => look for style in the GetCapabilities xml
format=image/png => look for format in the GetCapabilities xml
All WMS (web mapping service) services support GetMap request by default, if you haven't disabled it, you can use the same server url but with different request parameter. Pay attention to your both URLs. They are exactly the same until the request part:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0
From here you can set the request parameter to either GetCapabilities or GetMap. For example:
http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&request=GetMap