While trying out WMS GetMap POST XML requests (to overcome GET URL character limit issues), I found out that GetMap XML documents formatted according to the OGC GetMap XML Schemas (http://schemas.opengis.net/sld/1.1/GetMap.xsd) are not accepted.
Here is an example:
<sld:GetMap xmlns:sld="http://www.opengis.net/sld"
xmlns:se="http://www.opengis.net/se"
xmlns:ows="http://www.opengis.net/ows"
xmlns:wms="http://www.opengis.net/wms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/se http://schemas.opengis.net/se/1.1.0/FeatureStyle.xsd http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd http://www.opengis.net/ows http://schemas.opengis.net/ows/1.0.0/owsAll.xsd"
version="1.3.0">
<sld:StyledLayerDescriptor version="1.1.0">
<sld:NamedLayer>
<se:Name>sf:archsites</se:Name>
<sld:NamedStyle>
<se:Name>point</se:Name>
</sld:NamedStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
<sld:CRS>EPSG:32662</sld:CRS>
<sld:BoundingBox>
<ows:LowerCorner>-1.1563040908623124E7 4940069.939036611</ows:LowerCorner>
<ows:UpperCorner>-1.1536922910423303E7 4952386.271745646</ows:UpperCorner>
</sld:BoundingBox>
<sld:Output>
<sld:Size>
<sld:Width>651</sld:Width>
<sld:Height>307</sld:Height>
</sld:Size>
<wms:Format>image/png</wms:Format>
<sld:Transparent>true</sld:Transparent>
</sld:Output>
</sld:GetMap>
This produces the following result:
<?xml version=“1.0” encoding=“UTF-8”?>
<ServiceExceptionReport version=“1.3.0” xmlns=“http://www.opengis.net/ogc” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“http://www.opengis.net/ogc http://localhost:8080/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd”>
<ServiceException>
Could not parse the XML for: org.geoserver.wms.GetMapRequest
</ServiceException>
</ServiceExceptionReport>
I found a working example on https://anitagraser.com/2010/06/09/getmap-from-geoserver-using-http-post/ but the use XML does not comply with OGC’s GetMap XML Schemas.
|