General HTTP Request Rules |
At present, the only distributed computing platform(DCP)explicitly supported by OGC Web Services is the World Wide Web it self, or more specifically Internet hosts implementing the Hypertext Transfer Protocol(HTTP)[IETF RFC 2616]. Thus the Online Resource of each operation supported by a service instance 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 parameters comprising the service request itself are mandated by the OGC Web Services specifications.
HTTP supports two request methods: GET and POST. One or both of these methods may be defined for a particular OGC Web Service type and offered by a service instance, and the use of the Online Resource URL differs in each case. The basic WMS specification only defines HTTP GET for invoking operations.(A Styled Layer Descriptor WMS[3] defines HTTP POST for some operations.
The URLspecification[IETF RFC 2396] reserves particular characters as significant and requires that these be escaped when they might conflict with their defined usage. The present WMS specification explicitly reserves several of these characters for use in the query portion of HTTP GET request. When the characters"?","&","=","/",":" and "," appear in one of the roles defined in Table 1, they are to appear literally in the URL. When such characters appear elsewhere (for example, in the value of a parameter), they are to be encoded as defined in [IETF RFC 2396].
Note: In SuperMap iServer 6, if characters in request parameter have conflict with reserved characters, iServer will employ UFT-8 and conduct encoding conversion.
Table 1 Reserved Characters in HTTP GET Query
Character | Reserved Usage |
? | Separator indicating start of query string. |
& | Separator between parameters in query string. |
= | Separator between name and value of parameter. |
/ | Separator between MIME type and subtype in format parameter value. |
: | Separator between Namespace and Identifier in SRS parameter value. |
, | Separator between individual values in list-oriented parameters. |
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 as an opaque string including the protocol, hostname, optional port number, path, a question mark '?', and, optionally, one or more server-specific parameters ending in an ampersand '&'. The prefix uniquely identifies the particular service instance. A client appends the necessary request parameters as name/value pairs in the form "name=value&". The resulting URL shall be valid according to the HTTP Common Gateway Interface standard [CGI], which mandates the presence of '?' before the sequence of query parameters and the '&' between each parameter.
The URL prefix shall end in either a '?' (in the absence of additional server-specific parameters) or a '&'. In practice, however, Clients should be prepared to add a necessary trailing '?' or '&' before appending the Operation parameters defined in this specification in order to construct a valid request URL.
Table 2 summarizes the components of an operation request URL.
Table 2 A general OGC Web Service Request
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. The prefix is entirely at the discretion of the service provider. |
Name=value& | One or more standard request parameter name/value pairs defined by an OGC Web Service. The actual list of required and optional parameters is mandated for each operation by the appropriate OWS specification. |
An Online Resource URL intended for HTTP POST requests is a complete and valid URL to which Clients transmit request parameters in the body of the POST request. A WMS shall not require additional parameters to be appended to the URL in order to construct a valid target for the Operation request. Operation requests using HTTP POST have not yet been defined for the basic Web Map Service.