Trying to connect to my Orion CB which has entities created via IoTAgentCPP/IDAS. Both are of latest Docker version (okt 30 2015). All works fine using the FIGWAY Python scripts: Creating IDAS Service, Register Device, Send Observation, see Entity created and changed attributes via OCB.
But using any WireCloud Mashup widget like the NGSI Browser Widget that sends NSGI requests to the OCB the widget remains blanc, since the OCB sends back:
{
"errorCode" : {
"code" : "404",
"reasonPhrase" : "No context element found"
}
}
This reply is also received when querying via curl:
curl my_remote_ocb_host:1026/v1/contextEntities -S --header 'Accept: application/json'
If I add the header --header 'Fiware-Service: fiwareiot'
(which was specified when creating the IoT service w IDAS) to the curl-command line, then I get expected responses from the OCB.
However, the Widgets and Operators in WC have no means to add the Fiware-Service
HTTP-Header. This is what I receive from WC via the Lab proxy, using protocol capture, at the OCB host:
POST /v1/queryContext?limit=20&details=on&offset=0 HTTP/1.1
Host: <myhost>:1026
origin: https://mashup.lab.fiware.org
Cookie: ..
Content-Length: 45
via: 1.1 mashup.lab.fiware.org (Wirecloud-python-Proxy/1.1)
accept-language: en-US,en;q=0.8,de;q=0.6,fr;q=0.4,nl;q=0.2,it;q=0.2
accept-encoding: gzip, deflate
x-forwarded-host: <myhost>:1026
x-forwarded-for: ..
accept: application/json
user-agent: ..
connection: keep-alive
x-requested-with: XMLHttpRequest
referer: https://mashup.lab.fiware.org/justb4/GeonovumTemperature1
X-Auth-Token: ..
content-type: application/json
{"entities":[{"id":".*","isPattern":"true"}]}
Response: HTTP/1.1 200 OK
Content-Length: 94
Content-Type: application/json
Date: Sat, 31 Oct 2015 13:23:44 GMT
{
"errorCode" : {
"code" : "404",
"reasonPhrase" : "No context element found"
}
}
Possibly the settings for WC Widgets/Operators need to be extended to allow for Fiware-Service HTTP headers, or is there another way for doing this using the current possibilities?