Fiware 如何配置Cepheus CEP,使其将json而不是xml返回到orion?
最近我开始使用Cepheus CEP,但根据文档,我无法将其插入orion实体。查看acculator.py的错误,我发现cepheus cep向orion发送xml查询。xml在orion中不是被弃用了吗 cepheus cep中使用的配置:Fiware 如何配置Cepheus CEP,使其将json而不是xml返回到orion?,fiware,fiware-orion,Fiware,Fiware Orion,最近我开始使用Cepheus CEP,但根据文档,我无法将其插入orion实体。查看acculator.py的错误,我发现cepheus cep向orion发送xml查询。xml在orion中不是被弃用了吗 cepheus cep中使用的配置: { "host":"http://localhost:1028", "in":[ { "id":"Room.*", "type":"Room", "isPattern":true, "pro
{
"host":"http://localhost:1028",
"in":[
{
"id":"Room.*",
"type":"Room",
"isPattern":true,
"providers":[
"http://localhost:1027"
],
"attributes":[
{ "name":"temperature", "type":"double" },
{ "name":"floor", "type":"string" }
]
}
],
"out":[
{
"id":"Floor1",
"type":"Floor",
"brokers":[
{
"url":"http://localhost:1029"
}
],
"attributes":[
{ "name":"temperature", "type":"double" }
]
}
],
"statements":[
"INSERT INTO Floor SELECT floor as id, avg(temperature) as temperature FROM Room.win:time(10 min) GROUP BY floor OUTPUT LAST EVERY 10 sec"
]
}
- 1029猎户座经纪人
- 1028仙后座
- 1027仙王座经纪人
127.0.0.1 - - [13/May/2016 05:50:46] "POST /ngsi10/updateContext HTTP/1.1" 200 -
POST http://localhost:1029/ngsi10/updateContext
Content-Length: 404
User-Agent: Apache-HttpAsyncClient/4.1 (Java/1.8.0_91)
Connection: Keep-Alive
Host: localhost:1029
Accept: application/xml
Content-Type: application/xml
<updateContextRequest><updateAction>APPEND</updateAction><contextElementList><contextElement><entityId type="Floor" isPattern="false"><id>Floor1</id></entityId><contextAttributeList><contextAttribute><name>temperature</name><type>double</type><contextValue>22.333333333333332</contextValue><metadata/></contextAttribute></contextAttributeList></contextElement></contextElementList></updateContextRequest>=======================================
使用正确的代理配置,我会出现以下错误:
2016-05-13 06:07:08.504 WARN 12977 --- [nio-1027-exec-8] c.o.c.broker.controller.NgsiController : UpdateContext failed for http://localhost:1026: org.springframework.web.client.HttpClientErrorException: 415 Unsupported Media Type
我认为产生此错误的原因还在于查询的xml格式。Cepheus 0.1.16与0.28之后的Orion不兼容,因为xml支持已被删除。我向Cepheus添加了一个问题以跟踪此问题:
[更新]以JSON作为NGSI交换的默认格式发布。谢谢。你知道发行日期吗?
2016-05-13 06:07:08.504 WARN 12977 --- [nio-1027-exec-8] c.o.c.broker.controller.NgsiController : UpdateContext failed for http://localhost:1026: org.springframework.web.client.HttpClientErrorException: 415 Unsupported Media Type