oostethys_sos.cgi and POST requests?

3 views
Skip to first unread message

Emilio Mayorga

unread,
Aug 11, 2009, 4:30:08 PM8/11/09
to Eric Bridger, Rick Blair, xen...@googlegroups.com
Hi Eric,

Rick Blair is enhancing ERDDAP to make it play nicer with SOS
services. We've run into a problem with your Perl OOSTethys SOS server
(as implemented and slightly modified by myself, on my Xenia-based
NANOOS database). I've never had any problems with normal HTTP GET
requests. Have you, Jeremy here, or anyone you know exercised the POST
request parts of this code, much at all?

When Rick issues a POST request from ERDDAP (Java), using the
following payload string (the string is formatted to pretty print, but
that should be irrelevant):
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +    "<GetObservation
\n" +    "xmlns=\"http://www.opengis.net/sos/1.0\"\n" +
"xmlns:gml=\"http://www.opengis.net/gml\"\n" +
"xmlns:ogc=\"http://www.opengis.net/ogc\"\n" +
"xmlns:ows=\"http://www.opengeospatial.net/ows\"\n" +
"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +
"xmlns:swe=\"http://www.opengis.net/swe\"\n" +    "service=\"SOS\"
version=\"1.0.0\" >\n" +    "<offering>uw.orca.duckab.vpb</offering>"
+        "<observedProperty>water_temperature</observedProperty>" +
"<eventTime>\n" +      "<ogc:T_During>\n" +
"<gml:TimePeriod>\n" +
"<gml:beginPosition>2008-12-28T00:00:00</gml:beginPosition>\n" +
   "<gml:endPosition>2008-12-29T04:40:31</gml:endPosition>\n" +
"</gml:TimePeriod>\n" +      "</ogc:T_During>\n" +    "</eventTime>\n"
+    "<resultFormat>application/com-xml</resultFormat>\n" +
"</GetObservation>\n";

We get this error back:
<?xml version="1.0"?> <ExceptionReport
xmlns="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ows owsExceptionReport.xsd"
version="1.0.0" language="en"> <Exception locator="service"
exceptionCode="NoApplicableCode"><ExceptionText>Data not available for
the requested Time or BBOX.</ExceptionText></Exception>
</ExceptionReport>

The equivalent GET request works without any issues:
http://habu.apl.washington.edu/cgi-bin/xan_oostethys_sos.cgi?request=GetObservation&offering=uw.orca.duckab.vpb&observedProperty=water_temperature&eventTime=2008-12-28T00:00:00/2008-12-29T04:40:31

BTW, this URL is now externally accessible, though it's not
operational/QA-QC'd yet. You can try it out, though it's not terribly
interesting or enlightening.

Thanks for your help, as always! Cheers,

-Emilio Mayorga
NANOOS

Emilio Mayorga

unread,
Aug 11, 2009, 4:51:03 PM8/11/09
to Rick Blair, xen...@googlegroups.com, Eric Bridger
Rick,

Excellent!! Very good eye, esp. given that EVENTTIME is actually used
just once elsewhere in the code, in sub doGetObservation:
my $in_time = $in_params->{EVENTTIME};

I'm cc'ing this to Eric and the Xenia list, as a wrap-up and
resolution of our question.

-Emilio

On Tue, Aug 11, 2009 at 1:45 PM, Rick Blair<rick....@boeing.com> wrote:
> Hi Emilio,
>
> FIXED IT!
>
> Here is the offending code:
>
>  $param_ref->{EVENTTIME}  on about line 912 and line 945
>
> It was
>
>  $param_ref->{TIME}
>
> However the rest of the code refered to this parameter as
> $param_ref->{EVENTTIME}
>
>
> Thanks for your help.
>
> Rick
>
> --
> Tìoraidh!
>
> Rick Blair
> Associate Technical Fellow
> Boeing Research and Technology
> Network Systems Technology
> Information Management Program
> M/S:  42-50
> Voice:  (206) 544-1610

Eric Bridger

unread,
Aug 11, 2009, 5:35:10 PM8/11/09
to Emilio Mayorga, Rick Blair, xen...@googlegroups.com
Yes Rick,
Excellent! I will update the PERL code via svn in Google code.

Eric

Reply all
Reply to author
Forward
0 new messages