Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » OM2M :Method Not Allowed Update on ContentInstance is not Allowed(unable to update a container instance)
OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750175] Fri, 16 December 2016 18:04 Go to next message
Cyril FOTSO is currently offline Cyril FOTSOFriend
Messages: 8
Registered: December 2016
Junior Member
index.php/fa/27899/0/Hello ,
please, i'm facing one issue,
it's about updating data in my application,
when i try a PUT request on my containerInstance, i get a 405 ERROR CODE,

Can somebody tell me how to update value of a container instance, and GET the value, using XML queries or other way please.

Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750177 is a reply to message #1750175] Fri, 16 December 2016 18:15 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Cyril,

According to oneM2M standard it is not allowed to udpate a contentInstance resource.

TS 0001 2.10.0 Functional Architecture
10.2.19.4 <contentInstance> UPDATE
The Update operation shall not apply to <contentInstance> resource.

http://www.onem2m.org/images/files/deliverables/Release2/TS-0001-%20Functional_Architecture-V2_10_0.pdf
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750241 is a reply to message #1750175] Mon, 19 December 2016 09:19 Go to previous messageGo to next message
Guillaume Garzone is currently offline Guillaume GarzoneFriend
Messages: 54
Registered: April 2015
Member
Hello Cyril,

In complement of what Mahdi told you, if you want to "update" a content instance, that means store a new value of data, you should create a new content instance (POST a new resource). Indeed, the update operation is not allowed by the standard.

Guillaume
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750245 is a reply to message #1750241] Mon, 19 December 2016 09:57 Go to previous messageGo to next message
Cyril FOTSO is currently offline Cyril FOTSOFriend
Messages: 8
Registered: December 2016
Junior Member
Hello Guillaume & Mahdi,
If i've well understand, for each value of my sensor, i should create a new content instance, ok i see now,
but please, can i have a sample xml query to get a precise content instance, for example the last stored one base one date, or other parameters ?

And according to this document on the FTP OneM2M standard repository : at the page 4/6 they describe how to update a ContentInstance

https://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwjEuZS6_v_QAhVEfRoKHSZmDtoQFggaMAA&url=http%3A%2F%2Fftp.onem2m.org%2FMeetings%2FTST%2F20150729_TST18.1%2FTST-2015-0158-ContentInstance_update.DOC&usg=AFQjCNGcfdICq0UiDQFKLENuiKx_BVIWKQ&bvm=bv.142059868,d.d2s
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750246 is a reply to message #1750245] Mon, 19 December 2016 10:00 Go to previous messageGo to next message
Cyril FOTSO is currently offline Cyril FOTSOFriend
Messages: 8
Registered: December 2016
Junior Member
here the direct ftp link : ftp.onem2m.org/Meetings/TST/20150729_TST18.1/TST-2015-0158-ContentInstance_update.DOC
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750249 is a reply to message #1750246] Mon, 19 December 2016 10:15 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Dear Cyril,

1) You can add the keywords "/la" or "/ol" to your container URL to get respectively the latest or the oldest contentInstance.

Examples:
http://192.168.0.2:8080/cse-name/ae-name/container-name/la
http://192.168.0.2:8080/cse-name/ae-name/container-name/ol

2) The document you mentioned is a wrong "change request" never been accepted to oneM2M TS-0013 "Interoperability Testing" document.

Please check the final version of oneM2M TS-0013 section 8.1.5 "ContentInstance Management" available here:
http://www.onem2m.org/images/files/deliverables/TS-0013-Interoperability_Testing-V1_0_0.pdf

By the way, all oneM2M specifications are publicly available here:
http://www.onem2m.org/technical/published-documents
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750286 is a reply to message #1750249] Mon, 19 December 2016 14:59 Go to previous messageGo to next message
Cyril FOTSO is currently offline Cyril FOTSOFriend
Messages: 8
Registered: December 2016
Junior Member
Thank you Mahdi,
Now the POST / GET / DELETE on content instance is well understood and well working,
i hope i will have time to do a full tutorial on how to use this amazing frameweork on the raspberry pi with reel sensor,
and a real sensor (i'm using the DS18B20 sensor) with a simple python script to post (using REST or CoAP) data automatically to the gateway i've install on the Pi,
Thank you again,

Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1750369 is a reply to message #1750286] Tue, 20 December 2016 12:45 Go to previous messageGo to next message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
It will be great! Very excited to see you tutorial.

Merry Christmas and happy new year.
Re: OM2M :Method Not Allowed Update on ContentInstance is not Allowed [message #1760131 is a reply to message #1750286] Sun, 23 April 2017 15:27 Go to previous message
valentina vv95 is currently offline valentina vv95Friend
Messages: 8
Registered: April 2017
Junior Member
Cyril FOTSO wrote on Mon, 19 December 2016 14:59
Thank you Mahdi,
Now the POST / GET / DELETE on content instance is well understood and well working,
i hope i will have time to do a full tutorial on how to use this amazing frameweork on the raspberry pi with reel sensor,
and a real sensor (i'm using the DS18B20 sensor) with a simple python script to post (using REST or CoAP) data automatically to the gateway i've install on the Pi,
Thank you again,



Hi,
are you done a tutorial?
I have one question more.
How you create your client on raspbery? Are you also using OM2M platform?
I'm a little bit confused how to create connection between my computer(in this case server) and raspberry.

Thank you,
Valentina
Previous Topic:Problem with non blocking request (Synch)
Next Topic:waspmote on xbee
Goto Forum:
  


Current Time: Fri Apr 19 20:50:30 GMT 2024

Powered by FUDForum. Page generated in 0.03248 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top