到目前为止,我一直在使用在 Fi-Lab/Cloud 中创建的独立模式下的上下文代理实例,并使用 psb-orion-image。现在我想将该 CB 的一个实例与 http//orion.lab.fi-ware.org 联合。我使用 XML 表单来创建、更新......并且要联合的实例的名称是“UPCT:TEMPERATURE:SENSOR”,而传感器类型是“UPCT:SENSOR”。
因此,通过 SSH 连接,我发送下一个表单:
(curl localhost:1026/NGSI10/subscribeContext -s -S --header 'Content-Type: application/xml' -d @- | xmllint --format -) <<EOF
<?xml version="1.0"?>
<subscribeContextRequest>
<entityIdList>
<entityId type="UPCT:SENSOR" isPattern="false">
<id>UPCT:TEMPERATURE:SENSOR</id>
</entityId>
</entityIdList>
<reference>http://orion.lab.fi-ware.eu:1026/ngsi10/notifyContext</reference>
<duration>P1M</duration>
<notifyConditions>
<notifyCondition>
<type>ONCHANGE</type>
<condValueList>
<condValue>temperature</condValue>
</condValueList>
</notifyCondition>
</notifyConditions>
<throttling>PT5S</throttling>
</subscribeContextRequest>
EOF
我得到了正确的答复,带有订阅 ID。但是,如果我更新实例的 de contextValue 并尝试向http://orion.lab.fi.ware.eu:1026发送查询,则会收到错误消息:
-:1: 解析器错误:需要开始标记,'<' not found Auth-token not found in request header ^
我想我应该得到与我更新到我的实例相同的值,如中所示
我需要知道出了什么问题,以及我如何才能对全球 CB 做联邦调查。
谢谢