Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing requests for SOS 2.0.0: not parsing procedure names correctly #62

Open
pesekon2 opened this issue Jun 21, 2020 · 2 comments
Open

Comments

@pesekon2
Copy link
Contributor

Not sure this issue should be opened in this istSOS repo, but as this is the one with interface/admin, hopefully it is the right place

When I try to query the istSOS demo service with SOS version 1.0.0, the following query works without a problem:

http://istsos.org/istsos/demo?service=SOS&
    version=1.0.0&
    request=GetObservation&
    offering=temporary&
    observedProperty=urn:ogc:def:parameter:x-istsos:1.0:meteo:air:rainfall&
    responseFormat=text/xml;subtype="om/1.0.0"&
    eventTime=2015-05-28T00:00:00+0200/2015-06-02T00:00:00+0200&
    procedure=BELLINZONA

However, when I try to change the SOS version (1.0.0 to 2.0.0) and the response format (text/xml;subtype="om/1.0.0" to http://www.opengis.net/om/2.0) as in the following query, I always get an error saying Invalid parameter value in 'procedure' parameter: temporary.

http://istsos.org/istsos/demo?service=SOS&
    version=2.0.0&
    request=GetObservation&
    offering=temporary&
    observedProperty=urn:ogc:def:parameter:x-istsos:1.0:meteo:air:rainfall&
    responseFormat=http://www.opengis.net/om/2.0&
    eventTime=2015-05-28T00:00:00+0200/2015-06-02T00:00:00+0200&
    procedure=BELLINZONA

Seems like the offering attribute is somehow erroneously parsed into the procedure one.

@massimiliano-cannata
Copy link
Member

massimiliano-cannata commented Jun 22, 2020 via email

@pesekon2
Copy link
Contributor Author

Okay, that sounds very much like my fault/missing knowledge about SOS 1.0.0/2.0 differences. Thank you. And sorry.

However, after changing it to the procedure name or skipping the parameter, I always end up in this error message. Is it something on my side, or on the server side?

<ExceptionReport xsi:schemaLocation="http://www.opengis.net/ows/1.1 ../owsExceptionReport.xsd" version="1.0.0" xml:lang="en"><Exception exceptionCode="NoApplicableCode"><ExceptionText>
    TypeError
  </ExceptionText><ExceptionText>
    Unicode-objects must be encoded before hashing
  </ExceptionText><ExceptionText>
    ['Traceback (most recent call last):\n', '  File "/usr/share/istsos/application_istsoslib.py", line 95, in executeSos\n    render = FRe.sosFactoryRender(response, sosConfig)\n', '  File "/usr/share/istsos/istsoslib/renderers/factory_render.py", line 47, in sosFactoryRender\n    return GOresponseRender.render(response, sosConfig)\n', '  File "/usr/share/istsos/istsoslib/renderers/GOresponseRender.py", line 60, in render\n    return XMLformat_2_0_0(GO, sosConfig)\n', '  File "/usr/share/istsos/istsoslib/renderers/GOresponseRender.py", line 440, in XMLformat_2_0_0\n    omobservation.set("{%s}id" % ns[\'gml\'], "o_%s" % hashlib.md5(uid).hexdigest())\n', 'TypeError: Unicode-objects must be encoded before hashing\n']
  </ExceptionText></Exception></ExceptionReport>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants