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

DescribeSensor: InvalidParameterValue for outputFormat #23

Closed
ninsbl opened this issue Aug 27, 2017 · 7 comments
Closed

DescribeSensor: InvalidParameterValue for outputFormat #23

ninsbl opened this issue Aug 27, 2017 · 7 comments

Comments

@ninsbl
Copy link

ninsbl commented Aug 27, 2017

DescribeSensor request yields in exception:

http://istsos.org/istsos/demo?request=DescribeSensor&procedure=GARBOW&service=SOS&version=1.0.0&outputFormat=text/xml;subtype=%22sensorML/1.0.1%22

<Exception locator="outputFormat" exceptionCode="InvalidParameterValue">
<ExceptionText>
Supported "outputFormat" values are: text/xml;subtype="sensorML/1.0.1"
</ExceptionText>
</Exception>
</ExceptionReport>

See also this possibly related issue in java-core:
istSOS/java-core#3

@ninsbl
Copy link
Author

ninsbl commented Aug 27, 2017

This POST request however seems to work:

<?xml version="1.0" encoding="UTF-8"?>
    <sos:describeSensor
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://schemas.opengis.net/sos/1.0.0/sosAll.xsd"
       xmlns:sos="http://www.opengis.net/sos/1.0"
       xmlns:gml="http://www.opengis.net/gml/3.2"
       xmlns:ogc="http://www.opengis.net/ogc"
       xmlns:om="http://www.opengis.net/om/1.0"
       service="SOS"
       outputFormat='text/xml;subtype="sensorML/1.0.1"'>

          <procedure>T_LUGANO</procedure>
    </sos:describeSensor>

@nuest
Copy link

nuest commented Sep 6, 2017

Not sure about the standards requirements here (didn't check), but URL-encoding the value of outputFormat does not help either (I'm pretty sure the latter one is how it is supposed to be):

http://istsos.org/istsos/demo?request=DescribeSensor&procedure=GARBOW&service=SOS&version=1.0.0&outputFormat=text/xml;subtype%3D%22sensorML/1.0.1%22

http://istsos.org/istsos/demo?request=DescribeSensor&procedure=GARBOW&service=SOS&version=1.0.0&outputFormat=text/xml;subtype%3D"sensorML/1.0.1"

@massimiliano-cannata
Copy link
Member

massimiliano-cannata commented Sep 6, 2017 via email

@mantonovic
Copy link
Member

mantonovic commented Sep 6, 2017

Hi the correct request is this one:

http://istsos.org/istsos/demo?request=DescribeSensor&procedure=GRABOW&service=SOS&version=1.0.0&outputFormat=text%2Fxml%3Bsubtype%3D%22sensorML%2F1.0.1%22

It doesn't worked because of the procedure name: GARBOW instead of GRABOW

@ninsbl
Copy link
Author

ninsbl commented Sep 6, 2017

Yes, thanks, Milan!

However, it seems to be also an issue of how the request is formated. As this:

http://istsos.org/istsos/demo?request=DescribeSensor&procedure=GRABOW&service=SOS&version=1.0.0&outputFormat=text/xml;subtype="sensorML/1.0.1"

(with correct naming of the procedure) does not work.
Also the exception would be misleading if the issue only was a typo in the procedure name... Would`nt it?

@mantonovic
Copy link
Member

I agree with you about the misleading message, we should change that message.

Parameter encoding is mandatory, text/xml;subtype="sensorML/1.0.1" contains some reserved characters (in our case: "/" ";" "="). As you can see in the IETF Standard of Uniform Resource Identifier (URI): Generic Syntax.

That's why we have to send: text%2Fxml%3Bsubtype%3D"sensorML%2F1.0.1" instead of the more readable representation.

PS: the double quotes are not encoded, that's because they are not reserved.

@ninsbl
Copy link
Author

ninsbl commented Sep 6, 2017

Thanks Milan for the explanation!
So this is not an istSOS problem and we can close the issue, right!?
If not please reopen!

@ninsbl ninsbl closed this as completed Sep 6, 2017
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

4 participants