Opened 16 years ago
Closed 16 years ago
#2546 closed defect (fixed)
Invalid setting of srsName (around line 2838) when parsing a POST request generates an invalid exception when issuing a GetObservation request to a SOS 1.0.0 server
Reported by: | nsavard | Owned by: | tomkralidis |
---|---|---|---|
Priority: | normal | Milestone: | 5.2 release |
Component: | SOS Server | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | OGC, Cite, TEAM, SOS 1.0.0 |
Cc: |
Description
When the srsName parameter is present in a GetObervation POST request sent to a SOS 1.0.0 server, an invalid exception is raised. The problem is around line 2838 of mapogcsos.c, sosparams->pszResultModel should be sosparams->pszSrsName.
Code:
int msSOSParseRequest(mapObj *map, cgiRequestObj *request, sosParamsObj *sosparams) {
...
/* check for srsName */ psXPathTmp = msLibXml2GetXPath(doc, context, (xmlChar *)"/sos:GetObservation/@srsName");
if (psXPathTmp) {
nodeset = psXPathTmp->nodesetval; sosparams->pszResultModel = (char *)xmlNodeListGetString(doc, nodeset->nodeTab[0]->xmlChildrenNode, 1);
}
...
Exception:
<?xml version="1.0" encoding="ISO-8859-1"?> <ows:ExceptionReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" version="1.0.0" xml:lang="en-US" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="resultModel">
<ows:ExceptionText>msSOSGetObservation(): SOS server error. resultModel should be om:Measurement or om:Observation</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Norm: fixed in r7452. Closing.