GetCapabilities request SOAP encoding GetCapabilities request SOAP encoding example GetCapabilities SOAP encoding response

Copyright © 2010 Open Geospatial Consortium Inc. 55

9.1.4 GetCapabilities SOAP encoding response example

The following fragment remarks the SOAP envelope and the encoding of GetCapabilities response in the OperationsMetadata section: ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:soap = http:www.w3.org200305soap-envelope soap:Body Capabilities version = 1.0.0 xmlns = http:www.opengis.netwmts1.0 xmlns:ows = http:www.opengis.netows1.1 xmlns:xlink = http:www.w3.org1999xlink xmlns:gml = http:www.opengis.netgml ... ows:OperationsMetadata ows:Operation name = GetCapabilities ows:DCP ows:HTTP ows:Post xlink:href = http:www.maps.bobmaps.cgi? ows:Constraint name = PostEncoding ows:AllowedValues ows:Value SOAP ows:Value ows:AllowedValues ows:Constraint ows:Post ows:HTTP ows:DCP ows:Operation ... WSDL xlink:role = http:schemas.xmlsoap.orgwsdl1.0 xlink:show = none xlink:type = simple xlink:href = wmtsConcrete.wsdl Capabilities soap:Body soap:Envelope

9.2 GetTile

9.2.1 GetTile request SOAP encoding

Servers may also implement SOAP encoding using HTTP POST transfer of the GetTile operation request, using SOAP version 1.2 encoding.

9.2.2 GetTile request SOAP encoding example

An example of the SOAP encoding of the GetTile operation request equivalent of the request in subclause 8.2.1 is: ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:soap = http:www.w3.org200305soap-envelope soap:Body GetTile service = WMTS version = 1.0.0 xmlns = http:www.opengis.netwmts1.0 Layer etopo2 Layer 56 Copyright © 2010 Open Geospatial Consortium Inc. Style default Style Format imagepng Format TileMatrixSet WholeWorld_CRS_84 TileMatrixSet TileMatrix 10m TileMatrix TileRow 1 TileRow TileCol 3 TileCol GetTile soap:Body soap:Envelope

9.2.3 GetTile SOAP encoding response

The response of a successful SOAP-encoded GetTile operation request SHALL be an image with the MIME type specified by the Format parameter of the request, wrapped in the SOAP version 1.2 envelope. If the image is binary such as is the case with imagepng and imagejpeg images, it SHALL be base64 encoded and placed within the following XML element: element name = BinaryPayload complexType sequence element name = Format type = ows:MimeType element name = PayloadContent type = base64Binary sequence complexType element The xs:base64Binary type and associated base64-encoding rules are defined in the XML Schema Part 2 W3C recommendation. MIME element includes the MIME type of the original BinaryPayload. NOTE 1 The reason for using embedded encoded data instead of linking to an external source is to allow secured implementations. Since the main part of the SOAP message is the base64 encoded binary content, base64 data SHOULD be enclosed inside a [CDATA[ ]]. This will prevent unnecessary parse of the base64 data resulting in a fast XML parse and validation. NOTE 2 Current JavaScript XML parsers have limits on the length of the element content that are often too low to contain a base64 256x256 image in a single element. It as been seen that the use of [CDATA[ ]] is a workaround for this limitation.

9.2.4 GetTile SOAP encoding response example

An example of the SOAP response may look like: ?xml version=1.0 encoding=UTF-8? soap:Envelope xmlns:soap = http:www.w3.org200305soap-envelope soap:Body wmts:BinaryPayload wmts:Format imagepng wmts:Format wmts:BinaryContent -- base64-encoded -- [CDATA[ R0lGODdh4AEOAfYAAOGW9aM9MuC6L943LRu 0KlkxJ1auJJQrIdGoXs8lXAyiWUofVkecU4U