OpenGIS
©
Specification OGC 04-094
Copyright © Open Geospatial Consortium, Inc 2005
13
Table 2b – Request encoding and transport methods
HTTP GET METHOD HTTP POST METHOD
XML encoded requests
textxml
KVP encoded requests
Not applicable applicationx-www-form-urlencoded
When using the HTTP POST method, the content type for XML encoded WFS requests must be set to textxml.
When using the HTTP POST method, the content type for KVP encoded WFS requests must be set to applicationx-www-form-urlencoded and the content of the document must
be equivalent to the query string of an HTTP GET request. That is, the content must be equivalent to the string that follows the ‘?’ character in a URL encoded GET request. Of
course, the content must be encoded [10] to protect special characters.
When using the HTTP GET method and KVP encoded WFS requests, a MIME type is not applicable as the entire request is encoded in the URL as keyword-value pairs that
follow the ‘?’ character.
The combination of XML encoded requests and the HTTP GET method is not supported.
6.6 Namespaces
Namespaces 17 are used to discriminate XML vocabularies from one another. For the WFS there are three normative namespace definitions, namely:
• http:www.opengeospatial.netwfs
- for the WFS interface vocabulary •
http:www.opengeospatial.netgml - for the GML vocabulary
• http:www.opengeospatial.netogc
- for the OGC Filter vocabulary A given WFS implementation will make use of one or more GML Application Schemas
and these schemas will use, in turn, one or more application namespaces e.g. http:www.someserver.commyns. While many of the examples in this document use a
single namespace, multiple namespaces can be used, as shown in subclause 11.2.6.
6.7 Simple object access protocol SOAP
This subclause specifies the use of SOAP messages for communication between a web feature service client and a web feature service using the HTTP POST method.
The Simple Object Access Protocol SOAP is a communication protocol for communication between applications. It defines a format for sending messages between
communicating applications via the Internet and specifically using HTTP. Soap is platform independent, language independent and SOAP messages are encoded using
OpenGIS
©
Specification OGC 04-094
Copyright © Open Geospatial Consortium, Inc 2005
14
XML. This means that SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming
languages.
A SOAP message is an ordinary XML document containing the following elements:
a A required Envelope element that identifies the XML document as a SOAP message b An optional Header element that contains header information
c A required Body element that contains call and response information d An optional Fault element that provides information about errors that occurred while
processing the message
All the elements above are declared in the default namespace for the SOAP envelope:
http:www.w3.org200305soap-envelope
and the default namespace for SOAP encoding and data types is:
http:www.w3.org200305soap-encoding
The SOAP specification defines a number of syntax rules. Among the most important are:
e A SOAP message shall be encoded using XML f A SOAP message shall use the SOAP Envelope namespace
g A SOAP message shall use the SOAP Encoding namespace h A SOAP message shall not contain a DTD reference
i A SOAP message shall not contain XML Processing Instructions
The following XML fragment illustrates a skeleton SOAP message:
?xml version=1.0? soap:Envelope
xmlns:soap=http:www.w3.org200305soap-envelope soap:encodingStyle=http:www.w3.org200305soap-encoding
soap:Header ...
... soap:Header
soap:Body ...
... soap:Fault
... ...
soap:Fault soap:Body
soap:Envelope