sos4R : expectation failed error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sos4R : expectation failed error

CharlesB
Hello,

I am trying to use sos4R with a simple request and I encounter th following error "expectation failed".

mySOS <- SOS(url = "http://sos.irceline.be/sos")
OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime = sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
[getObservation] Requesting offering 81102 - PM10 by name.
[getObservation] Got observation(s) from offering because none given: 81102 - PM10
[.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering  81102 - PM10
[.getObservation_1.0.0] REQUEST:
 Object of class SosGetObservation:  service:  SOS , version:  1.0.0 , offering:  81102 - PM10
observered property:  81102 - PM10
responseFormat(s):  text/xml;subtype="om/1.0.0" , responseMode(s):  NA
procedure(s) NA
        feature(s) of interest  
        event time:  <S4 object of class "SosEventTime"> 
        result:  NULL
srsName:  NA
resultModel(s):  NA
[.sosRequest_1.0.0] Encoding Function (beginning of function body):  { standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
[encodeRequestXML] SosGetObservation
[encodeXML] SosEventTime
[encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time: 2016-06-14 ]
        --> GmlTimePosition [ time: 2016-06-15 ] ]
[.encodeTM]  TM_During
[encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time: 2016-06-14 ]
        --> GmlTimePosition [ time: 2016-06-15 ] ]
[encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
[encodeXML] POSIXt with value 2016-06-14
Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-15 ]
[encodeXML] POSIXt with value 2016-06-15
Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
[.sosRequest_1.0.0] REQUEST:<sos:GetObservation xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS" version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:om="http://www.opengis.net/om/1.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml">
 <sos:offering>81102 - PM10</sos:offering>
 <sos:eventTime>
  <ogc:TM_During>
   <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
   <gml:TimePeriod>
    <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
    <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
   </gml:TimePeriod>
  </ogc:TM_During>
 </sos:eventTime>
 <sos:observedProperty>81102 - PM10</sos:observedProperty>
 <sos:responseFormat>text/xml;subtype="om/1.0.0"</sos:responseFormat>
</sos:GetObservation>
Erreur : Expectation Failed

Thanks for your help !

C. Beaugard
Reply | Threaded
Open this post in threaded view
|

Re: sos4R : expectation failed error

Daniel Nüst-2
This works for me in the current development version:

mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
curlOptions = list(verbose = TRUE))
OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
                     eventTime = sosCreateTime(sos = mySOS, time =
"2016-06-14::2016-06-15"), verbose=TRUE)


> summary(OBS)
Object of class OmObservationCollection
[[members:]] [1] 61
[[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
266325.0 225661.0"
[[procedures:]] [1] 61
[[obs. props:]] [1] 1
[[features:]] [1] 61


Changing the binding to "KVP" did the trick. Setting the curlOptions to
verbose gave some potentially helpful output, so I contacted the SOS
maintainer and SOS devs about it: https://github.com/52North/sos4R/issues/49

/Daniel


On 16/06/16 17:24, CharlesB wrote:

> Hello,
>
> I am trying to use sos4R with a simple request and I encounter th following
> error "expectation failed".
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos")
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
> [getObservation] Requesting offering 81102 - PM10 by name.
> [getObservation] Got observation(s) from offering because none given: 81102
> - PM10
> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering  81102
> - PM10
> [.getObservation_1.0.0] REQUEST:
>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
> offering:  81102 - PM10
> observered property:  81102 - PM10
> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; , responseMode(s):
> NA
> procedure(s) NA
>         feature(s) of interest  
>         event time:  <S4 object of class "SosEventTime">
>         result:  NULL
> srsName:  NA
> resultModel(s):  NA
> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
> [encodeRequestXML] SosGetObservation
> [encodeXML] SosEventTime
> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [.encodeTM]  TM_During
> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
> [encodeXML] POSIXt with value 2016-06-14
> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
> with GmlTimePosition [ time: 2016-06-15 ]
> [encodeXML] POSIXt with value 2016-06-15
> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
> [.sosRequest_1.0.0] REQUEST:<sos:GetObservation
> xsi:schemaLocation="http://www.opengis.net/sos/1.0
> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ows="http://www.opengis.net/ows/1.1"
> xmlns:om="http://www.opengis.net/om/1.0"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
>  <sos:offering>81102 - PM10</sos:offering>
>  <sos:eventTime>
>   <ogc:TM_During>
>    <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
>    <gml:TimePeriod>
>     <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
>     <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
>    </gml:TimePeriod>
>   </ogc:TM_During>
>  </sos:eventTime>
>  <sos:observedProperty>81102 - PM10</sos:observedProperty>
>
> <sos:responseFormat>text/xml;subtype=&quot;om/1.0.0&quot;</sos:responseFormat>
> </sos:GetObservation>
> Erreur : Expectation Failed
>
> Thanks for your help !
>
> C. Beaugard
>
>
>
>
> --
> View this message in context: http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
> Sent from the 52° North - Geostatistics Community Forum mailing list archive at Nabble.com.
> _______________________________________________
> Geostatistics mailing list
> [hidden email]
> http://list.52north.org/mailman/listinfo/geostatistics
> http://geostatistics.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines
>

--
Daniel Nüst
Institute for Geoinformatics (ifgi),   University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info
_______________________________________________
Geostatistics mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: sos4R : expectation failed error

Clara.L
Hello,
I would like to get data from the url = "http://sos.irceline.be/sos", using
the following code :
OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
sosCreateTime(sos = mySOS, time ="2016-06-14::2016-06-15"), verbose=TRUE)


 I tried the code of Charles and Daniel, but they do not work :

mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
curlOptions = list(verbose = TRUE))
*Error in getCapabilities(sos = .sos, verbose = verboseOutput, ...) :
  unused argument (binding = "KVP")*

mySOS <- SOS(url = "http://sos.irceline.be/sos")
...
...
     </sos:ObservationOfferingList>
  </sos:Contents>
*</sos:Capabilities>:5067: parser error : Opening and ending tag mismatch:
Capabilities line 2 and Capabilit*
[sos4R] Created SOS for URL http://sos.irceline.be/sos 

Error message but it works, and :

OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
sosCreateTime(sos = mySOS, time ="2016-06-14::2016-06-15"), verbose=TRUE)
   ...
   ...
</sos:GetObservation>
*Erreur : Expectation Failed *

I also tried the url : "http://geo.irceline.be/sos/" as suggested here
https://github.com/52North/sos4R/issues/49#issue-255839272
<https://github.com/52North/sos4R/issues/49#issue-255839272>   but it
doesn't work:
> mySOS <- SOS(url = "http://geo.irceline.be/sos/")
*Error: Method Not Allowed*

Any solution ?!

Thanks you for your help !

C. Landry


Daniel Nüst-2 wrote

> This works for me in the current development version:
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
> curlOptions = list(verbose = TRUE))
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
>                      eventTime = sosCreateTime(sos = mySOS, time =
> "2016-06-14::2016-06-15"), verbose=TRUE)
>
>
>> summary(OBS)
> Object of class OmObservationCollection
> [[members:]] [1] 61
> [[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
> 266325.0 225661.0"
> [[procedures:]] [1] 61
> [[obs. props:]] [1] 1
> [[features:]] [1] 61
>
>
> Changing the binding to "KVP" did the trick. Setting the curlOptions to
> verbose gave some potentially helpful output, so I contacted the SOS
> maintainer and SOS devs about it:
> https://github.com/52North/sos4R/issues/49
>
> /Daniel
>
>
> On 16/06/16 17:24, CharlesB wrote:
>> Hello,
>>
>> I am trying to use sos4R with a simple request and I encounter th
>> following
>> error "expectation failed".
>>
>> mySOS <- SOS(url = "http://sos.irceline.be/sos")
>> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
>> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"),
>> verbose=TRUE)
>> [getObservation] Requesting offering 81102 - PM10 by name.
>> [getObservation] Got observation(s) from offering because none given:
>> 81102
>> - PM10
>> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering
>> 81102
>> - PM10
>> [.getObservation_1.0.0] REQUEST:
>>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
>> offering:  81102 - PM10
>> observered property:  81102 - PM10
>> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; ,
>> responseMode(s):
>> NA
>> procedure(s) NA
>>         feature(s) of interest  
>>         event time:  
> <S4 object of class "SosEventTime">
>  
>>         result:  NULL
>> srsName:  NA
>> resultModel(s):  NA
>> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
>> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
>> [encodeRequestXML] SosGetObservation
>> [encodeXML] SosEventTime
>> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
>> 2016-06-14 ]
>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>> [.encodeTM]  TM_During
>> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
>> 2016-06-14 ]
>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
>> [encodeXML] POSIXt with value 2016-06-14
>> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
>> with GmlTimePosition [ time: 2016-06-15 ]
>> [encodeXML] POSIXt with value 2016-06-15
>> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
>> [.sosRequest_1.0.0] REQUEST:
> <sos:GetObservation
>>
>  xsi:schemaLocation="http://www.opengis.net/sos/1.0
>> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
>> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ows="http://www.opengis.net/ows/1.1"
>> xmlns:om="http://www.opengis.net/om/1.0"
>> xmlns:ogc="http://www.opengis.net/ogc"
>> xmlns:gml="http://www.opengis.net/gml">
>>  
> <sos:offering>
> 81102 - PM10
> </sos:offering>
>>  
> <sos:eventTime>
>>  
> <ogc:TM_During>
>>    
> <ogc:PropertyName>
> om:samplingTime
> </ogc:PropertyName>
>>    
> <gml:TimePeriod>
>>    
> <gml:beginPosition>
> 2016-06-14T00:00:00
> </gml:beginPosition>
>>    
> <gml:endPosition>
> 2016-06-15T00:00:00
> </gml:endPosition>
>>    
> </gml:TimePeriod>
>>  
> </ogc:TM_During>
>>  
> </sos:eventTime>
>>  
> <sos:observedProperty>
> 81102 - PM10
> </sos:observedProperty>
>>
>>
> <sos:responseFormat>
> text/xml;subtype=&quot;om/1.0.0&quot;
> </sos:responseFormat>
>>
> </sos:GetObservation>
>> Erreur : Expectation Failed
>>
>> Thanks for your help !
>>
>> C. Beaugard
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
>> Sent from the 52° North - Geostatistics Community Forum mailing list
>> archive at Nabble.com.
>> _______________________________________________
>> Geostatistics mailing list
>>

> Geostatistics@

>> http://list.52north.org/mailman/listinfo/geostatistics
>> http://geostatistics.forum.52north.org
>> Please respect our mailing list guidelines:
>> http://52north.org/resources/mailing-lists-and-forums/guidelines
>>
>
> --
> Daniel Nüst
> Institute for Geoinformatics (ifgi),   University of Münster
> Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
> http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info
> _______________________________________________
> Geostatistics mailing list

> Geostatistics@

> http://list.52north.org/mailman/listinfo/geostatistics
> http://geostatistics.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines


This works for me in the current development version:

mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
curlOptions = list(verbose = TRUE))
OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
                     eventTime = sosCreateTime(sos = mySOS, time =
"2016-06-14::2016-06-15"), verbose=TRUE)


> summary(OBS)
Object of class OmObservationCollection
[[members:]] [1] 61
[[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
266325.0 225661.0"
[[procedures:]] [1] 61
[[obs. props:]] [1] 1
[[features:]] [1] 61


Changing the binding to "KVP" did the trick. Setting the curlOptions to
verbose gave some potentially helpful output, so I contacted the SOS
maintainer and SOS devs about it: https://github.com/52North/sos4R/issues/49

/Daniel


On 16/06/16 17:24, CharlesB wrote:

> Hello,
>
> I am trying to use sos4R with a simple request and I encounter th
> following
> error "expectation failed".
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos")
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
> [getObservation] Requesting offering 81102 - PM10 by name.
> [getObservation] Got observation(s) from offering because none given:
> 81102
> - PM10
> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering
> 81102
> - PM10
> [.getObservation_1.0.0] REQUEST:
>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
> offering:  81102 - PM10
> observered property:  81102 - PM10
> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; ,
> responseMode(s):
> NA
> procedure(s) NA
>         feature(s) of interest  
>         event time:  <S4 object of class "SosEventTime">
>         result:  NULL
> srsName:  NA
> resultModel(s):  NA
> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
> [encodeRequestXML] SosGetObservation
> [encodeXML] SosEventTime
> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [.encodeTM]  TM_During
> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
> 2016-06-14 ]
>         --> GmlTimePosition [ time: 2016-06-15 ] ]
> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
> [encodeXML] POSIXt with value 2016-06-14
> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
> with GmlTimePosition [ time: 2016-06-15 ]
> [encodeXML] POSIXt with value 2016-06-15
> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
> [.sosRequest_1.0.0] REQUEST:<sos:GetObservation
> xsi:schemaLocation="http://www.opengis.net/sos/1.0
> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:ows="http://www.opengis.net/ows/1.1"
> xmlns:om="http://www.opengis.net/om/1.0"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml">
>  <sos:offering>81102 - PM10</sos:offering>
>  <sos:eventTime>
>   <ogc:TM_During>
>    <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
>    <gml:TimePeriod>
>     <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
>     <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
>    </gml:TimePeriod>
>   </ogc:TM_During>
>  </sos:eventTime>
>  <sos:observedProperty>81102 - PM10</sos:observedProperty>
>
> <sos:responseFormat>text/xml;subtype=&quot;om/1.0.0&quot;</sos:responseFormat>
> </sos:GetObservation>
> Erreur : Expectation Failed
>
> Thanks for your help !
>
> C. Beaugard
>
>
>
>
> --
> View this message in context:
> http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
> Sent from the 52° North - Geostatistics Community Forum mailing list
> archive at Nabble.com.
> _______________________________________________
> Geostatistics mailing list
> Geostatistics@
> http://list.52north.org/mailman/listinfo/geostatistics
> http://geostatistics.forum.52north.org
> Please respect our mailing list guidelines:
> http://52north.org/resources/mailing-lists-and-forums/guidelines
>

--
Daniel Nüst
Institute for Geoinformatics (ifgi),   University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info
_______________________________________________
Geostatistics mailing list
Geostatistics@
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines





--
Sent from: http://geostatistics.forum.52north.org/
_______________________________________________
Geostatistics mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines
Reply | Threaded
Open this post in threaded view
|

Re: sos4R : expectation failed error

Daniel Nüst
Which version of sos4R do you use?

Please show us your sessionInfo()

/Daniel

On 22/11/17 15:55, Clara.L wrote:

> Hello,
> I would like to get data from the url = "http://sos.irceline.be/sos", using
> the following code :
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
> sosCreateTime(sos = mySOS, time ="2016-06-14::2016-06-15"), verbose=TRUE)
>
>
>  I tried the code of Charles and Daniel, but they do not work :
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
> curlOptions = list(verbose = TRUE))
> *Error in getCapabilities(sos = .sos, verbose = verboseOutput, ...) :
>   unused argument (binding = "KVP")*
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos")
> ...
> ...
>      </sos:ObservationOfferingList>
>   </sos:Contents>
> *</sos:Capabilities>:5067: parser error : Opening and ending tag mismatch:
> Capabilities line 2 and Capabilit*
> [sos4R] Created SOS for URL http://sos.irceline.be/sos 
>
> Error message but it works, and :
>
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
> sosCreateTime(sos = mySOS, time ="2016-06-14::2016-06-15"), verbose=TRUE)
>    ...
>    ...
> </sos:GetObservation>
> *Erreur : Expectation Failed *
>
> I also tried the url : "http://geo.irceline.be/sos/" as suggested here
> https://github.com/52North/sos4R/issues/49#issue-255839272
> <https://github.com/52North/sos4R/issues/49#issue-255839272>   but it
> doesn't work:
>> mySOS <- SOS(url = "http://geo.irceline.be/sos/")
> *Error: Method Not Allowed*
>
> Any solution ?!
>
> Thanks you for your help !
>
> C. Landry
>
>
> Daniel Nüst-2 wrote
>> This works for me in the current development version:
>>
>> mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
>> curlOptions = list(verbose = TRUE))
>> OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
>>                      eventTime = sosCreateTime(sos = mySOS, time =
>> "2016-06-14::2016-06-15"), verbose=TRUE)
>>
>>
>>> summary(OBS)
>> Object of class OmObservationCollection
>> [[members:]] [1] 61
>> [[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
>> 266325.0 225661.0"
>> [[procedures:]] [1] 61
>> [[obs. props:]] [1] 1
>> [[features:]] [1] 61
>>
>>
>> Changing the binding to "KVP" did the trick. Setting the curlOptions to
>> verbose gave some potentially helpful output, so I contacted the SOS
>> maintainer and SOS devs about it:
>> https://github.com/52North/sos4R/issues/49
>>
>> /Daniel
>>
>>
>> On 16/06/16 17:24, CharlesB wrote:
>>> Hello,
>>>
>>> I am trying to use sos4R with a simple request and I encounter th
>>> following
>>> error "expectation failed".
>>>
>>> mySOS <- SOS(url = "http://sos.irceline.be/sos")
>>> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
>>> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"),
>>> verbose=TRUE)
>>> [getObservation] Requesting offering 81102 - PM10 by name.
>>> [getObservation] Got observation(s) from offering because none given:
>>> 81102
>>> - PM10
>>> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering
>>> 81102
>>> - PM10
>>> [.getObservation_1.0.0] REQUEST:
>>>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
>>> offering:  81102 - PM10
>>> observered property:  81102 - PM10
>>> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; ,
>>> responseMode(s):
>>> NA
>>> procedure(s) NA
>>>         feature(s) of interest  
>>>         event time:  
>> <S4 object of class "SosEventTime">
>>  
>>>         result:  NULL
>>> srsName:  NA
>>> resultModel(s):  NA
>>> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
>>> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
>>> [encodeRequestXML] SosGetObservation
>>> [encodeXML] SosEventTime
>>> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
>>> 2016-06-14 ]
>>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>>> [.encodeTM]  TM_During
>>> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
>>> 2016-06-14 ]
>>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>>> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
>>> [encodeXML] POSIXt with value 2016-06-14
>>> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
>>> with GmlTimePosition [ time: 2016-06-15 ]
>>> [encodeXML] POSIXt with value 2016-06-15
>>> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
>>> [.sosRequest_1.0.0] REQUEST:
>> <sos:GetObservation
>>>
>>  xsi:schemaLocation="http://www.opengis.net/sos/1.0
>>> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
>>> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:ows="http://www.opengis.net/ows/1.1"
>>> xmlns:om="http://www.opengis.net/om/1.0"
>>> xmlns:ogc="http://www.opengis.net/ogc"
>>> xmlns:gml="http://www.opengis.net/gml">
>>>  
>> <sos:offering>
>> 81102 - PM10
>> </sos:offering>
>>>  
>> <sos:eventTime>
>>>  
>> <ogc:TM_During>
>>>    
>> <ogc:PropertyName>
>> om:samplingTime
>> </ogc:PropertyName>
>>>    
>> <gml:TimePeriod>
>>>    
>> <gml:beginPosition>
>> 2016-06-14T00:00:00
>> </gml:beginPosition>
>>>    
>> <gml:endPosition>
>> 2016-06-15T00:00:00
>> </gml:endPosition>
>>>    
>> </gml:TimePeriod>
>>>  
>> </ogc:TM_During>
>>>  
>> </sos:eventTime>
>>>  
>> <sos:observedProperty>
>> 81102 - PM10
>> </sos:observedProperty>
>>>
>>>
>> <sos:responseFormat>
>> text/xml;subtype=&quot;om/1.0.0&quot;
>> </sos:responseFormat>
>>>
>> </sos:GetObservation>
>>> Erreur : Expectation Failed
>>>
>>> Thanks for your help !
>>>
>>> C. Beaugard
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
>>> Sent from the 52° North - Geostatistics Community Forum mailing list
>>> archive at Nabble.com.
>>> _______________________________________________
>>> Geostatistics mailing list
>>>
>
>> Geostatistics@
>
>>> http://list.52north.org/mailman/listinfo/geostatistics
>>> http://geostatistics.forum.52north.org
>>> Please respect our mailing list guidelines:
>>> http://52north.org/resources/mailing-lists-and-forums/guidelines
>>>
>>
>> --
>> Daniel Nüst
>> Institute for Geoinformatics (ifgi),   University of Münster
>> Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
>> http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info
>> _______________________________________________
>> Geostatistics mailing list
>
>> Geostatistics@
>
>> http://list.52north.org/mailman/listinfo/geostatistics
>> http://geostatistics.forum.52north.org
>> Please respect our mailing list guidelines:
>> http://52north.org/resources/mailing-lists-and-forums/guidelines
>
>
> This works for me in the current development version:
>
> mySOS <- SOS(url = "http://sos.irceline.be/sos", binding = "KVP",
> curlOptions = list(verbose = TRUE))
> OBS <-getObservation(sos = mySOS, offering="81102 - PM10",
>                      eventTime = sosCreateTime(sos = mySOS, time =
> "2016-06-14::2016-06-15"), verbose=TRUE)
>
>
>> summary(OBS)
> Object of class OmObservationCollection
> [[members:]] [1] 61
> [[bounded by:]] [1] "urn:ogc:def:crs:EPSG::31370, 24655.0 46070.0,
> 266325.0 225661.0"
> [[procedures:]] [1] 61
> [[obs. props:]] [1] 1
> [[features:]] [1] 61
>
>
> Changing the binding to "KVP" did the trick. Setting the curlOptions to
> verbose gave some potentially helpful output, so I contacted the SOS
> maintainer and SOS devs about it: https://github.com/52North/sos4R/issues/49
>
> /Daniel
>
>
> On 16/06/16 17:24, CharlesB wrote:
>> Hello,
>>
>> I am trying to use sos4R with a simple request and I encounter th
>> following
>> error "expectation failed".
>>
>> mySOS <- SOS(url = "http://sos.irceline.be/sos")
>> OBS <-getObservation(sos = mySOS, offering="81102 - PM10", eventTime =
>> sosCreateTime(sos = mySOS, time = "2016-06-14::2016-06-15"), verbose=TRUE)
>> [getObservation] Requesting offering 81102 - PM10 by name.
>> [getObservation] Got observation(s) from offering because none given:
>> 81102
>> - PM10
>> [.getObservation_1.0.0] to  http://sos.irceline.be/sos  with offering
>> 81102
>> - PM10
>> [.getObservation_1.0.0] REQUEST:
>>  Object of class SosGetObservation:  service:  SOS , version:  1.0.0 ,
>> offering:  81102 - PM10
>> observered property:  81102 - PM10
>> responseFormat(s):  text/xml;subtype=&quot;om/1.0.0&quot; ,
>> responseMode(s):
>> NA
>> procedure(s) NA
>>         feature(s) of interest  
>>         event time:  <S4 object of class "SosEventTime">
>>         result:  NULL
>> srsName:  NA
>> resultModel(s):  NA
>> [.sosRequest_1.0.0] Encoding Function (beginning of function body):  {
>> standardGeneric("encodeRequestXML")  ... [ 0  more chrs].
>> [encodeRequestXML] SosGetObservation
>> [encodeXML] SosEventTime
>> [encodeXML] TM_During with GmlTimePeriod: [ GmlTimePosition [ time:
>> 2016-06-14 ]
>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>> [.encodeTM]  TM_During
>> [encodeXML] GmlTimePeriod with GmlTimePeriod: [ GmlTimePosition [ time:
>> 2016-06-14 ]
>>         --> GmlTimePosition [ time: 2016-06-15 ] ]
>> [encodeXML] GmlTimePosition with GmlTimePosition [ time: 2016-06-14 ]
>> [encodeXML] POSIXt with value 2016-06-14
>> Formatted  1465855200  to  2016-06-14T00:00:00[encodeXML] GmlTimePosition
>> with GmlTimePosition [ time: 2016-06-15 ]
>> [encodeXML] POSIXt with value 2016-06-15
>> Formatted  1465941600  to  2016-06-15T00:00:00[.sosRequest_1.0.0] POST!
>> [.sosRequest_1.0.0] REQUEST:<sos:GetObservation
>> xsi:schemaLocation="http://www.opengis.net/sos/1.0
>> http://schemas.opengis.net/sos/1.0.0/sosAll.xsd" service="SOS"
>> version="1.0.0" xmlns:sos="http://www.opengis.net/sos/1.0"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:ows="http://www.opengis.net/ows/1.1"
>> xmlns:om="http://www.opengis.net/om/1.0"
>> xmlns:ogc="http://www.opengis.net/ogc"
>> xmlns:gml="http://www.opengis.net/gml">
>>  <sos:offering>81102 - PM10</sos:offering>
>>  <sos:eventTime>
>>   <ogc:TM_During>
>>    <ogc:PropertyName>om:samplingTime</ogc:PropertyName>
>>    <gml:TimePeriod>
>>     <gml:beginPosition>2016-06-14T00:00:00</gml:beginPosition>
>>     <gml:endPosition>2016-06-15T00:00:00</gml:endPosition>
>>    </gml:TimePeriod>
>>   </ogc:TM_During>
>>  </sos:eventTime>
>>  <sos:observedProperty>81102 - PM10</sos:observedProperty>
>>
>> <sos:responseFormat>text/xml;subtype=&quot;om/1.0.0&quot;</sos:responseFormat>
>> </sos:GetObservation>
>> Erreur : Expectation Failed
>>
>> Thanks for your help !
>>
>> C. Beaugard
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://geostatistics.forum.52north.org/sos4R-expectation-failed-error-tp4022968.html
>> Sent from the 52° North - Geostatistics Community Forum mailing list
>> archive at Nabble.com.
>> _______________________________________________
>> Geostatistics mailing list
>> Geostatistics@
>> http://list.52north.org/mailman/listinfo/geostatistics
>> http://geostatistics.forum.52north.org
>> Please respect our mailing list guidelines:
>> http://52north.org/resources/mailing-lists-and-forums/guidelines
>>
>
--
Daniel Nüst
Institute for Geoinformatics (ifgi),   University of Münster
Heisenbergstraße 2, 48149 Münster, Germany; +49 251 83 31962
http://ifgi.uni-muenster.de/~d_nues01        http://o2r.info


_______________________________________________
Geostatistics mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sos4R : expectation failed error

Clara.L
I use :
> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252  
LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
[1] rgdal_1.2-15   maptools_0.9-2 mapdata_2.2-6  maps_3.2.0     sos4R_0.2-11  
sp_1.2-5       RCurl_1.95-4.8
[8] bitops_1.0-6   XML_3.98-1.9  

loaded via a namespace (and not attached):
[1] compiler_3.4.2  tools_3.4.2     foreign_0.8-69  grid_3.4.2    
lattice_0.20-35



--
Sent from: http://geostatistics.forum.52north.org/
_______________________________________________
Geostatistics mailing list
[hidden email]
http://list.52north.org/mailman/listinfo/geostatistics
http://geostatistics.forum.52north.org
Please respect our mailing list guidelines:
http://52north.org/resources/mailing-lists-and-forums/guidelines