General HTTP request rules |
This International Standard defines the implementation of the WMS on a distributed computing platform (DCP) comprising Internet hosts that support the Hypertext Transfer Protocol (HTTP). Thus, the Online Resource of each operation supported by a server is an HTTP Uniform Resource Locator (URL). The URL may be different for each operation, or the same, at the discretion of the service provider. Each URL shall conform to the description in IETF RFC 2616 but is otherwise implementation-dependent; only the query portion comprising the service request itself is defined by this International Standard.
WMS 1.3.0 supports two request methods: GET and POST. One or both of these methods may be offered by a server, and the use of the Online Resource URL differs in each case. Support for the GET method is mandatory; support for the POST method is optional.
The URL specification (IETF RFC 2396) reserves particular characters as significant and requires that these be escaped when they might conflict with their defined usage. (Note: In SuperMap iServer, if request parameters have conflict with reserved characters, iServer will employ UTF-8 and conduct encoding conversion.)
OGC specifications explain the usage of the reserved characters in WMS requests.
Table 1 Reserved characters in WMS query string
Character | Reserved usage |
? | Separator indicating start of query string. |
& | Separator between parameters in query string. |
= | Separator between name and value of parameter. |
, | Separator between individual values in list-oriented parameters (such as BBOX, LAYERS and STYLES in the GetMap request). |
+ | Shorthand representation for a space character. |
A WMS shall support the "GET" method of the HTTP protocol (IETF RFC 2616).
An Online Resource URL intended for HTTP GET requests is in fact only a URL prefix to which additional parameters are appended in order to construct a valid Operation request. A URL prefix is defined in accordance with IETF RFC 2396 as a string including, in order, the scheme ("http" or "https"), Internet Protocol hostname or numeric address, optional port number, path, mandatory question mark "?", and optional string comprising one or more server-specific parameters ending in an ampersand "&". The prefix defines the network address to which request messages are to be sent for a particular operation on a particular server. Each operation may have a different prefix. Each prefix is entirely at the discretion of the service provider.
This International Standard defines how to construct a query part that is appended to the URL prefix in order to form a complete request message. Every WMS operation has several mandatory or optional request parameters. Each parameter has a defined name. Each parameter may have one or more legal values, which are either defined by this International Standard or are selected by the client based on service metadata. To formulate the query part of the URL, a client shall append the mandatory request parameters, and any desired optional parameters, as name/value pairs in the form "name=value&" (parameter name, equals sign, parameter value, ampersand). The "&" is a separator between name/value pairs, and is therefore optional after the last pair in the request string.
When the HTTP GET method is used, the client-constructed query part is appended to the URL prefix defined by the server, and the resulting complete URL is invoked as defined by HTTP (IETF RFC 2616).
Table 2 summarizes the components of an operation request URL when HTTP GET is used.
Table 2 Structure of WMS request using HTTP GET
URL component | Description |
http://host[:port]/path[?{name[value]&}] |
URL prefix of service operation. [ ] denotes 0 or 1 occurrence of an optional part. {} denotes 0 or more occurrences. |
Name=value& | One or more standard request parameter name/value pairs as defined for each operation by this International Standard. |
A WMS may support the "POST" method of the HTTP protocol (IETF RFC 2616).
An Online Resource URL intended for HTTP POST requests is a complete URL (not merely a prefix as in the HTTP GET case) that is valid according to IETF RFC 2396 to which clients transmit request parameters in the body of the POST message. A WMS shall not require additional parameters to be appended to the URL in order to construct a valid target for the operation request. When POST is used, the request message is formulated as an XML document.