我发现我必须拥有另一个GE,IoT配置管理器与物联网经纪人并行工作,以便管理我们将从中获取数据的实体。现在,似乎XMLValidator代码给了我一些麻烦。我通过HTTP POST osgi9直接向配置管理器注册了一个实体。然后我尝试通过osgi10与IoT经纪人进行通信来访问它。 IoT Broker与IoT DIscovery服务进行通信并获得响应,但是然后XMLValidator表示XML是错误的,即使它显然不是很难。
这是IoT经纪人,要求物联网ConfMan提供资源:
2014-11-27 10:31:13,682 | INFO | (HttpConnectionClient.java:initializeConnection:170) | Output
Stream: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<discoverContextAvailabilityRequest>
<entityIdList>
<entityId isPattern="false">
<id>Dorm</id>
</entityId>
</entityIdList>
<attributeList/>
<restriction>
<scope>
<operationScope>
<scopeType>IncludeAssociations</scopeType>
<scopeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">SOURCES</scopeValue></operationScope>
</scope>
</restriction>
</discoverContextAvailabilityRequest>
然后IoT Broker得到:
2014-11-27 10:31:13,947 | INFO | (HttpConnectionClient.java:initializeConnection:188) |
<?xml version="1.0" encoding="UTF-8"?><discoverContextAvailabilityResponse>
<contextRegistrationResponseList>
<contextRegistrationResponse>
<contextRegistration>
<entityIdList>
<entityId type="Room" isPattern="false">
<id>Dorm</id>
</entityId>
</entityIdList>
<contextRegistrationAttributeList>
<contextRegistrationAttribute>
<name>temperature</name>
<type>degree</type>
<isDomain>false</isDomain>
<metadata>
<contextMetadata>
<name>ID</name>
<type>string</type>
<value/>
</contextMetadata>
<contextMetadata>
<name/>
<type/>
<value/>
</contextMetadata>
</metadata>
</contextRegistrationAttribute>
</contextRegistrationAttributeList>
<providingApplication>http://192.168.100.1:70
</providingApplication>
</contextRegistration>
</contextRegistrationResponse>
</contextRegistrationResponseList>
<errorCode>
<code>200</code>
<reasonPhrase>OK</reasonPhrase>
<details xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Result</details>
</errorCode>
</discoverContextAvailabilityResponse>
2014-11-27 10:31:13,949 | INFO | (HttpConnectionClient.java:initializeConnection:218) | Connection Closed!
2014-11-27 10:31:13,987 | INFO | (XmlValidator.java:error:128) |
ERROR
org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; cvc-complex-type.2.4.b: The content of element 'contextRegistration' is not complete. One of '
{registrationMetaData, providingApplication}
' is expected.
收到的xml清楚地看到,至少收到了提供的应用程序,但是XMLValidator没有看到这个。
答案 0 :(得分:-1)
与此同时,发布了许多错误修复的新版本,因此您的问题应该不再存在。
此外,我们在IoT代理中添加了一个配置管理器“light”,使您可以独立使用它。
P.S。我最近才意识到这个帮助请求。我很抱歉,因此我们无法及时为您提供答案。