2016-05-25 1 views
2

私は次の設定があります。私はそれが自動的にのIoT BrokerはのIoTディスカバリーに反対しているようだ

***/ngsi9/discoverContext/Availability*** 
生成 IoTBroker

GET ***/ngsi10/contextEntities/EntityName*** 

メッセージを発行したとき

IoTBroker(v.5.2.3) <-----> IotDicovery(v.4.3) 

へのクエリIoTDiscoveryIoTDiscoveryは、必要なエンティティ名に関する情報を

*200 OK* HTTP message 

で積極答えます。

問題がIoTBrokerは、最終的な応答をするとき、それは404 NOT FOUNDを HTTPメッセージで応答することです。

これは自動的IoTDiscoveryIoTBrokerによって生成されるPOST HTTPメッセージである:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<discoverContextAvailabilityRequest> 
    <entityIdList> 
     <entityId isPattern="false"> 
     <id>Room</id> 
     </entityId> 
    </entityIdList> 
    <attributeList/> 
     <restriction> 
     <attributeExpression> 
     </attributeExpression> 
     <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> 

、これは明らかにIoTBrokerIoTDiscoveryからの応答でありますすべてがOKです:

<?xml version="1.0" encoding="UTF-8"?><discoverContextAvailabilityResponse> 
    <contextRegistrationResponseList> 
    <contextRegistrationResponse> 
     <contextRegistration> 
     <entityIdList> 
      <entityId type="Room" isPattern="false"> 
      <id>ConferenceRoom</id> 
      </entityId> 
     </entityIdList> 
     <contextRegistrationAttributeList> 
      <contextRegistrationAttribute> 
      <name>temperature</name> 
      <type>degree</type> 
      <isDomain>false</isDomain> 
      <metadata> 
       <contextMetadata> 
       <name>unit</name> 
       <type>string</type> 
       <value/> 
       </contextMetadata> 
      </metadata> 
      </contextRegistrationAttribute> 
     </contextRegistrationAttributeList> 
     <providingApplication>http://192.168.100.1:70/tempApplication 
...</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> 
+0

この質問は(「私は、次の構成を有する」下のダイアグラムが含まれていませんオリオンとどのように関係するかわかりませんオリオン)、 "fi-orion"ラベル。しかし、私はこれにとにかく注意を払うつもりだ;) – fgalan

+1

"fiware-iot"ラベルがなく、データはNGSIプロトコルでフォーマットされているので、Orionと同じ方法で "fi-orion"ラベルを含めることにした! thnks @fgalan –

答えて

1

NGSI-10およびNGSI-9は、それぞれコンテキスト情報およびコンテキスト利用可能性情報に関する。より単純な表現では、NGSI-10は実際のデータに使用され、NGSI-9はデータプロバイダに関する情報を提供します。ここでのドキュメント(https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_NGSI-10_Open_RESTful_API_Specification)は、次の操作リソースは「コンビニ運用リソース」であるによると

/ngsi10/contextEntities/EntityName*** 

このリソースはNGSI-10 queryContextに相当します。したがって、入門コース(https://edu.fiware.org/course/view.php?id=33)(スライド10)を見て、IoTブローカにNGSI-10リクエストを行うと、後者は、IoTディスカバリをリクエストすることによって、そのような情報の提供元を探しています。 IoTディスカバリがプロバイダのリストで返答する場合、IoTブローカはデータプロバイダに問い合わせを行う。次に、IoTブローカはデータプロバイダからのすべての応答を集め、最後に要求に応答します。 データプロバイダのいずれかにそのようなコンテキスト情報がないか、または到達できない場合、IoTブローカは404 ContextElementが見つからないと応答しています。

したがって、NGSI-10経由でコンテキストを公開する必要があるNGSI-10データプロバイダを実装する必要があります。

+0

** IoT Discovery **は、JSON返信(192.168.100.1)で確認できるように、プロバイダのリスト(この場合は1つだけ)で返信します。問題は、** IoT Broker **がデータプロバイダに問い合わせていないことです。私はWiresharkでトリプルチェックしていますが、** IoT Broker **から192.168.100.1へのクエリはありません。 –