gpt4 book ai didi

fiware-orion - Orion CB 所需的 Fiware-Service HTTP header

转载 作者:行者123 更新时间:2023-12-04 05:10:04 24 4
gpt4 key购买 nike

尝试连接到我的 Orion CB,它具有通过 IoTAgentCPP/IDAS 创建的实体。两者都是最新的 Docker 版本(okt 30 2015)。使用 FIGWAY Python 脚本一切正常:创建 IDAS 服务、注册设备、发送观察,请参阅通过 OCB 创建和更改属性的实体。

但是使用任何 WireCloud Mashup 小部件,如向 OCB 发送 NSGI 请求的 NGSI 浏览器小部件,小部件保持空白,因为 OCB 发回:

{
"errorCode" : {
"code" : "404",
"reasonPhrase" : "No context element found"
}
}

通过 curl 查询时也会收到此回复:curl my_remote_ocb_host:1026/v1/contextEntities -S --header 'Accept: application/json'

如果我将 header --header 'Fiware-Service: fiwareiot'(在使用 IDAS 创建 IoT 服务时指定)添加到 curl 命令行,那么我会得到预期的响应OCB。

但是,WC 中的 Widgets 和 Operators 没有办法添加 Fiware-Service HTTP-Header。这是我在 OCB 主机上使用协议(protocol)捕获通过实验室代理从 WC 收到的内容:

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"
}
}

可能需要扩展 WC Widgets/Operators 的设置以允许 Fiware-Service HTTP header ,或者是否有其他方法可以使用当前的可能性来做到这一点?

最佳答案

WireCloud 支持在编程小部件和运算符时添加 FIWARE-Service header (有关更多信息,请参阅 documentation)。因此,这可以通过更新 FIWARE 实验室提供的基本小部件和运算符集来解决,以支持 FIWARE-Service header 。

我创建了一个 ticket在 NGSI 浏览器小部件的问题跟踪器中。请为其他小部件/运算符(operator)创建这样的票证。

NOTE: You can go to the issue tracker of a component if opening their details and clicking on the issue tracker button: enter image description here

关于fiware-orion - Orion CB 所需的 Fiware-Service HTTP header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33452246/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com