Ticket #2558 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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>

</GetObservation>

Change History

Changed 5 years ago by tomkralidis

  • owner changed from mapserverbugs to tomkralidis
  • status changed from new to assigned

Changed 5 years ago by nsavard

The exceptionCode must be "InvalidParameterValue?" and the locator "srsName".

Changed 5 years ago by tomkralidis

Once #2414 is implemented, that should fix this ticket.

Changed 5 years ago by tomkralidis

Commited with r7698.

Norm: try now?

Changed 5 years ago by nsavard

Tom: still no exception produce.

Changed 5 years ago by tomkralidis

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.

??

Changed 5 years ago by nsavard

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.

Changed 5 years ago by tomkralidis

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.

Changed 5 years ago by nsavard

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/).

Changed 5 years ago by nsavard

Tom: I meant to say: The service seems to work this morning. I forgot a word.

Changed 5 years ago by tomkralidis

Norm: thanks for the info. So you think this a CITE issue or a MapServer issue?

Changed 5 years ago by nsavard

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?

Changed 5 years ago by tomkralidis

  • cc assefa 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?

Changed 5 years ago by nsavard

Tom: This is fixed the issue. How should I have known about this metadata? I saw a reference to that in thicket 2414.

Changed 5 years ago by tomkralidis

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?

Changed 5 years ago by nsavard

Re: comment:15

Makes sense.

Re: comment:13

Waiting for Assefa's answer about trowing an exception if sos_srs isn't set.

Changed 5 years ago by nsavard

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?

Changed 5 years ago by tomkralidis

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.

Changed 5 years ago by tomkralidis

  • status changed from assigned to closed
  • resolution set to fixed

After irc convo w/ Assefa, we have consensus. Committed in r7727.

Since this also passes CITE, I will close.

Note: See TracTickets for help on using tickets.