[mapguide-users] WMS GetCapabilities response (mime-type)
Thomas M. Tuerke
thomas.m.tuerke at autodesk.com
Tue May 9 17:45:14 EDT 2006
Hi Bart,
Regarding your first question, The WMS 1.1.1 does in fact respond with the correct mime type, but it's possible that you're using an older instance of the 1.1.1 template where the content type was simply text/xml. Here's what comes back from a (not so) recent build.
Connection: close
Date: Tue, 09 May 2006 21:02:11 GMT
Server: Apache/2.0.55 (Win32) mod_fastcgi/2.4.2 mod_jk/1.2.15
Content-Length: 11700
Content-Type: application/vnd.ogc.wms_xml
Client-Date: Tue, 09 May 2006 21:02:13 GMT
Client-Peer: 132.188.4.212:8080
Client-Response-Num: 1
As for GetCapabilities formats, it's true... the spec doesn't indicate that GetCapy needs to take a FORMAT parameter (section 7.1.2) but it doesn't preclude it, either: section 6.2 says "only the parameters comprising the service request itself are mandated by the OGC Web Services specifications." In fact, the way the FORMAT parameter is worded, it can be interpreted to be an option for the GetCapy operation as well; section 6.5.3 says "The FORMAT parameter specifies the output format of the response to *an operation* ... A Service Instance may optionally offer a *new format* not previously offered by other instances, with the recognition that clients are not required to accept or process an unknown format ... A Client may accept only a subset of the formats known for that type of operation." (*Emphasis* mine)
Additionally, the spec says (in paragraph three of 6.4.1 Parameter Ordering and Case) "An OGC Web Service shall be prepared to encounter parameters that are not part of this specification ... " (which we do, some of which we actually act upon) and "... In terms of producing results per this specification, an OGC Web Service shall not require such parameters" (which we don't.)
All that aside, the nature of our Template engine made additional GetCapabilities formats trivial to offer, mostly as a safeguard against future versions of WMS, but also for possible non-standard extensions. For example, individual sites could offer a link to their WMS server with
.../mapagent.fcgi?request=GetCapabilities&service=WMS&format=text/html
(a much more "human-friendly" way of exploring the capabilities of the server), possibly even providing thumbnails of layers (left as an exercise for the reader) or whatever is desired. Doing so does not undermine the specified xml (application/vnd.ogc.wms_xml) method of interacting with the server, but if such functionality is not wanted on any given installation, the template file can be modified to remove the undesired formats.
In short, there's a lot of usefulness in the current WMS implementation, above and beyond what the specification would rigorously call for, but it's also trivial to remove these additions to provide only what the spec mandates.
I hope you enjoy exploring the WMS services in MapGuide.
- Thomas
-----Original Message-----
From: Bart van den Eijnden (OSGIS) [mailto:bartvde at xs4all.nl]
Sent: Tuesday, May 09, 2006 12:28 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] WMS GetCapabilities response (mime-type)
Hi list,
in the case of WMS 1.1.1, shouldn't the server respond with mimetype
"application/vnd.ogc.wms_xml" to a GetCapabilities request?
Also, it is strange that Mapguide WMS advertizes 3 formats for
GetCapabilities, whereas the GetCapabilities request does not even have
a parameter to specify the format.
Best regards,
Bart
--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org
More information about the Mapguide-users
mailing list