I have the next configuration:
IoTBroker(v.5.2.3) <-----> IotDicovery(v.4.3)
when I issue a
GET ***/ngsi10/contextEntities/EntityName***
message to the IoTBroker it automatically generates a
***/ngsi9/discoverContext/Availability***
query to the IoTDiscovery. The IoTDiscovery then answers positively with a
*200 OK* HTTP message
with the information about the EntityName required.
The problem is that when the IoTBroker makes the final response, it responds with a 404 NOT FOUND HTTP Message.
This is the POST HTTP message being automatically generated by the IoTBroker to the the IoTDiscovery:
<?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>
and this is the response from the IoTDiscovery to the IoTBroker, where apparently everything is 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>
You should associate your context entity at IoT Discovery to a URL. Thus, the IoT Broker will start to send requests to the IoT Providers announced by IoT Discovery.
There is more information about the association process at IoT Discovery in this new guide: http://fiware-iot-discovery-ngsi9.readthedocs.io/en/latest/programmer/programmer/index.html