Opened 16 years ago
Closed 16 years ago
#2558 closed defect (fixed)
A GetObservation request with an invalid srsname value sent to a SOS 1.0.0 server must return an exception
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: | assefa |
Description
An invalid srsname in a GetObservation request sent to a SOS 1.0.0 server must return an exception. Actually all observations are returned.
The CITE test is: getObservation:core-SOS.GetObservation-RequestInvalidSRSName.1 (s0003)
The request sent is:
URL: http://dev1.lan.mapgears.com/manwe/cgi-bin/mssos100_ogc_cite?
Body:
<GetObservation xmlns="http://www.opengis.net/sos/1.0" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ctl="http://www.occamlab.com/ctl" xmlns:parsers="http://www.occamlab.com/te/parsers" xmlns:xows="http://www.opengeospatial.net/ows" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:te="java:com.occamlab.te.TECore" xmlns:sosFunctions="https://cite.opengeospatial.org/sos-1.0.0/src/ctl/functions.xml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:getObservation="https://cite.opengeospatial.org/sos-1.0.0/src/ctl/GetObservation.xml" xmlns:gml="http://www.opengis.net/gml" xmlns:tml="http://www.opengis.net/tml" xmlns:om="http://www.opengis.net/om/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:tep="http://teamengine.sourceforge.net/parsers" service="SOS" srsName="urn:ogc:def:crs:EPSG:9999" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd">
<offering>Water</offering> <observedProperty>WaterQuality</observedProperty> <responseFormat>text/xml; subtype=om/1.0.0</responseFormat>
Change History (19)
comment:1 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 16 years ago
comment:6 by , 16 years ago
Norm: thats weird. I tested this at http://devgeo.cciw.ca/sos and pasted the exact XML document above as the request and I get an exception as expected.
??
comment:7 by , 16 years ago
Tom: I checked your link and it works as expected. Nevertheless it doesn't work with my SOS server and my MapServer built. I can see all the modifications in the files specified in r7698. I built a new MapServer package, closed/reopened Firefox and installed MapServer but it still doesn't work as it should.
I need to think if I forgot something.
comment:8 by , 16 years ago
Norm: I tried testing through CITE (s0001); the tests appear to have executed, however I can't get to the results (getting a 503 "Service Unavailable" error). Is CITE down?
Can you email the CITE list about why our srsName support is failing? I'll chime in as well once you init.
comment:9 by , 16 years ago
Tom: The service to work this morning.
I don't think this is a CITE test problem in respect to srsName since it works on your side with your data. I tried with the SOS client you provided me and it still doesn't return an exception (http://dev1.lan.mapgears.com/manwe/post-tests/).
comment:10 by , 16 years ago
Tom: I meant to say: The service seems to work this morning. I forgot a word.
comment:11 by , 16 years ago
Norm: thanks for the info. So you think this a CITE issue or a MapServer issue?
comment:12 by , 16 years ago
This is not a CITE test issue.
I don't think this is a MapServer issue as well unless you din't commit all the files since it works with http://devgeo.cciw.ca/sos/. Can you confirm that? Can you test with the URL I posted in comment #9?
comment:13 by , 16 years ago
Cc: | added |
---|
Norm: do you have MAP.WEB.METADATA.sos_srs set? If you set it (update msautotest/wxs/sos.map), the CITE assertion will work.
This is why you're getting everything back. The code doesn't throw exception if MAP.WEB.METADATA.sos_srs isn't set.
Assefa: should we throw exception if sos_srs isn't set? What do you think?
comment:14 by , 16 years ago
Tom: This is fixed the issue. How should I have known about this metadata? I saw a reference to that in thicket 2414.
comment:15 by , 16 years ago
It's in the docs, but listed as optional. I think this should be "required", as this testcase shows. i.e. if it's not defined in the mapfile, a client could still pass srsName.
Comments? Objections?
comment:16 by , 16 years ago
Re: comment:15
Makes sense.
Re: comment:13
Waiting for Assefa's answer about trowing an exception if sos_srs isn't set.
comment:17 by , 16 years ago
Re: comment:15
It's said in the doc that sos_srs should be set unless PROJECTION object is defined using "init=epsg:...". The projection object was defined in my map file. What does imply this affirmation?
comment:18 by , 16 years ago
Norm: I updated the docs (plone and svn) to reflect MAP.WEB.METADATA.sos_srs as a required metadata. I haven't committed throwing an exception yet.
comment:19 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
After irc convo w/ Assefa, we have consensus. Committed in r7727.
Since this also passes CITE, I will close.
The exceptionCode must be "InvalidParameterValue" and the locator "srsName".