Notification over MQTT [message #1763414] |
Mon, 15 May 2017 14:00 |
Maite Bezunartea Messages: 3 Registered: April 2017 |
Junior Member |
|
|
Hello,
We are testing the MQTT binding in OM2M. Whenever a new content instance is created, a notification should be published under the MQTT topic "oneM2M/resp/in-cse/LAMP/xml". This is correctly handled by OM2M, and a notification is automatically sent and received in the corresponding topic. However, we do not receive the whole content instance.
The content instance created is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<m2m:cin xmlns:m2m="..." rn="cin_716368782">
<ty>4</ty>
<ri>/in-cse/cin-716368782</ri>
<pi>/in-cse/cnt-353686584</pi>
<ct>20170515T154859</ct>
<lt>20170515T154859</lt>
<st>0</st>
<cnf>text/plain:0</cnf>
<cs>2</cs>
<con>ON</con>
</m2m:cin>
The notification received is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<m2m:rqp xmlns:m2m="...">
<op>5</op>
<to>/oneM2M/resp/in-cse/LAMP/xml</to>
<fr>admin:admin</fr>
<rqi>fa5cd20a-ef0d-4db0-8397-27b76a717e45</rqi>
<pc>
<m2m:sgn>
<nev>
<rep rn="cin_716368782">
<ty>4</ty>
<ri>/in-cse/cin-716368782</ri>
<pi>/in-cse/cnt-353686584</pi>
<ct>20170515T154859</ct>
<lt>20170515T154859</lt>
</rep>
<rss>1</rss>
</nev>
<sud>false</sud>
<sur>/in-cse/in-name/LAMP/DATA/SUB_LAMP</sur>
</m2m:sgn>
</pc>
</m2m:rqp>
As you can see, some of the attributes are missing in the notification (st, cnf, cs, con).
The problem seems to be the objToString function, called in MqttRestClient.java; payload = DataMapperRegistry.get(MimeMediaType.JSON).objToString(requestPrimitive);
Has anybody experienced this issue? Do you have any suggestion on how to solve this problem?
Thank you in advance .
Maite
|
|
|
|
Powered by
FUDForum. Page generated in 0.03117 seconds