0
我配置了Orion和Proton FIWARE Generic Enablers,並在Orion中進行訂閱,以便在Node類型的實體被修改時向Proton發送通知。Proton Orion訂閱 - 解析通知XML時出錯
Proton正在返回與解析接收到的XML相關的錯誤。
proton | Mar 02, 2016 11:46:47 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
proton | INFO: started event message body reader
proton | Mar 02, 2016 11:46:47 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
proton | INFO: Event: NodeContextUpdate
proton | Mar 02, 2016 11:46:47 AM com.ibm.hrl.proton.webapp.providers.EventXmlNgsiMessageReader readFrom
proton | SEVERE: Could not parse XML NGSI event java.lang.NullPointerException, reason: null
proton | last attribute name: null last value: null
我發現至少有另一位用戶發佈了類似的問題,但該問題的答案不符合(並解決)我的情況。
編輯:
這裏是騰已收到POST請求:
........POST /ProtonOnWebServer/rest/events HTTP/1.1
User-Agent: orion/0.27.0-next libcurl/7.19.7
Host: 192.168.99.100:8080
Accept: application/xml, application/json
Content-length: 901
Content-type: application/xml
<notifyContextRequest>
<subscriptionId>570b7cad849a7fd6c9ebaaf3</subscriptionId>
<originator>localhost</originator>
<contextResponseList>
<contextElementResponse>
<contextElement>
<entityId type="Node" isPattern="false">
<id>Node3</id>
</entityId>
<contextAttributeList>
<contextAttribute>
<name>temperature</name>
<type>double</type>
<contextValue>23</contextValue>
</contextAttribute>
<contextAttribute>
<name>pressure</name>
<type>double</type>
<contextValue>15</contextValue>
</contextAttribute>
</contextAttributeList>
</contextElement>
<statusCode>
<code>200</code>
<reasonPhrase>OK</reasonPhrase>
</statusCode>
</contextElementResponse>
</contextResponseList>
</notifyContextRequest>
謝謝。