WPS Execute Request URL Decoding

geoprocessing.info

Home  |  Terms of use

Decoding GET Execute Requests


Example

Consider a WPS Execute request encoded as follows:

http://foo.bar/foo?
   Request=Execute&
   Service=WPS&
   Version=1.0.0&
   Language=en-CA&
   Identifier=Buffer&
   DataInputs=InputPolygon%3D%40xlink%3Ahref%3Dhttp%253A%252F%252Ffoo.bar%252F
      some_WFS_request.xml%40method%3DPOST%40mimeType%3Dtext%252Fxml%40encoding
      %3DUTF-8%40schema%3Dhttp%253A%252F%252Ffoo.bar%252Fgml_polygon_schema.xsd
      %3B%20BufferDistance%3D400%40uom%3Dfeet&
   ResponseDocument=BufferedPolygon%3D%40asReference%3Dtrue&
   storeExecuteResponse=true&
   lineage=true&
   status=true

Upon receipt of this request, the HTTP server will use the "?" character to identify the base URL from the list of parameters, the "&" character to identify the separation of one parameter from the next, and the "=" character to identify the separation of a parameter name from its value. This will result in the following assignment of values to parameters.

ParameterValue
Version1.0.0
Languageen-CA
RequestExecute
IdentifierBuffer
DataInputsInputPolygon%3D%40xlink%3Ahref%3Dhttp%253A%252F%252Ffoo.bar%252F
some_WFS_request.xml%40method%3DPOST%40mimeType%3Dtext%252Fxml%40encoding
%3DUTF-8%40schema%3Dhttp%253A%252F%252Ffoo.bar%252Fgml_polygon_schema.xsd
%3B%20BufferDistance%3D400%40uom%3Dfeet
ResponseDocumentBufferedPolygon%3D%40asReference%3Dtrue
storeExecuteResponsetrue
lineagetrue
statustrue

Step 1

For the DataInputs and ResponseDocument (or RawDataOutput) parameters, the URL parameter values must be decoded, resulting in this case to the following assignment of values for these parameters:

ParameterDecoded Value
DataInputsInputPolygon=@xlink:href=http%3A%2F%2Ffoo.bar%2Fsome_WFS
_request.xml@method=POST@mimeType=text%2Fxml@encoding=UTF-
8@schema=http%3A%2F%2Ffoo.bar%2Fgml_polygon_schema.xsd;BufferDistance=400@uom=feet
ResponseDocumentBufferedPolygon=@asReference=true

Step 2

For each of these parameters, the WPS must use the first "=" character to identify the separation of an input/output name from its value, and the ";" character to identify the separation of one input/output value from the next, resulting in the following assignments:

ParameterInput/Output IdentifierValue
DataInputsInputPolygon@xlink:href=http%3A%2F%2Ffoo.bar%2Fsome_WFS
_request.xml@method=POST@mimeType=text%2Fxml
@encoding=UTF-8@schema=http%3A%2F%2Ffoo.bar
%2Fgml_polygon_schema.xsd
BufferDistance400@uom=feet
ResponseDocumentBufferedPolygon@asReference=true

Step 3

Within the value of each input/output, the "@" character shall be used to identify the separation of attributes from their input/output value and from one another, and the "=" character to separate an attribute name from its value. This produces the following assignments.

ParameterInput/Output IdentifierAttribute NameValue
DataInputsInputPolygon  
xlink:hrefhttp%3A%2F%2Ffoo.bar%2Fsome_WFS_request.xml
methodPOST
mimeTypetext%2Fxml
encodingUTF-8
schemahttp%3A%2F%2Ffoo.bar%2Fgml_polygon_schema.xsd
BufferDistance400
uomfeet
ResponseDocumentBufferedPolygon 
asReferencetrue

Step 4

For all attribute values, the WPS shall apply URL decoding, revealing the intended values of each of these parameters:

ParameterInput/Output IdentifierAttribute NameValue
DataInputsInputPolygon  
xlink:hrefhttp://foo.bar/some_WFS_request.xml
methodPOST
mimeTypetext/xml
encodingUTF-8
schemahttp://foo.bar/gml_polygon_schema.xsd
BufferDistance400
uomfeet
ResponseDocumentBufferedPolygon 
asReferencetrue