Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » Registration of a new Gateway Application
Registration of a new Gateway Application [message #1396563] Tue, 08 July 2014 13:37 Go to next message
Hao XU is currently offline Hao XUFriend
Messages: 18
Registered: June 2014
Junior Member
Hello everyone,
I am trying to register my Gateway Application to OM2M GSCL. But I haven't successed, here is the trace:
juil. 02, 2014 12:09:53 PM org.eclipse.om2m.comm.http.RestHttpServlet service
Infos: HttpRequest [method=POST, URI=/gscl/applications, representation=<?xml ve
rsion="1.0" encoding="UTF-8"?><ns1:application xmlns:ns1="http://uri.etsi.org/m2
m" appId="DA1" xmlns:xmime="http://www.w3.org/2005/05/xmlmime">
   <ns1:searchStrings>
      <ns1:searchString>FRIGO_TEMPERATURE_DEV_APP </ns1:searchString>
   </ns1:searchStrings>
</ns1:application>, Authorization=null, queryString=null]
juil. 02, 2014 12:09:53 PM org.eclipse.om2m.core.router.Router doRequest
Infos: RequestIndication [method=CREATE, base=null, targetID=/gscl/applications,
 representation=<?xml version="1.0" encoding="UTF-8"?><ns1:application xmlns:ns1
="http://uri.etsi.org/m2m" appId="DA1" xmlns:xmime="http://www.w3.org/2005/05/xm
lmime">
   <ns1:searchStrings>
      <ns1:searchString>FRIGO_TEMPERATURE_DEV_APP </ns1:searchString>
   </ns1:searchStrings>
</ns1:application>, requestingEntity=null, protocol=http]
juil. 02, 2014 12:09:53 PM org.eclipse.om2m.comm.http.RestHttpServlet service
Infos: HttpResponse [statusCode=402]


I have also compare this trace to that of the Sample simulated IPU, there are two differences:
1, targetID=/gscl/applications compared to targetID=gscl/applications
é, requestingEntity=null, protocol=http compared to requestingEntity=admin/admin, protocol=null

Could someone help me?
Thanks!
Re: Registration of a new Gateway Application [message #1396572 is a reply to message #1396563] Tue, 08 July 2014 13:53 Go to previous messageGo to next message
Hao XU is currently offline Hao XUFriend
Messages: 18
Registered: June 2014
Junior Member
I have found the reason. This is because of the authorization of OM2M.
Re: Registration of a new Gateway Application [message #1396595 is a reply to message #1396563] Tue, 08 July 2014 14:28 Go to previous message
Mahdi Ben Alaya is currently offline Mahdi Ben AlayaFriend
Messages: 229
Registered: November 2013
Senior Member
Hello Hao,

The requestingEntity should not be null.
You must add the Authorization header in your request using the basic HTTP authentication:
Authorization: Basic YWRtaW4vYWRtaW4=

Remark:
The requestingEntity should be Base64-encoded
Base64(admin/admin)= YWRtaW4vYWRtaW4=
(http://www.base64encode.org)

[Updated on: Tue, 08 July 2014 14:29]

Report message to a moderator

Previous Topic:Can NSCL be SCL of another NSCL
Next Topic:IPU Lamp Sample
Goto Forum:
  


Current Time: Thu Mar 28 11:49:24 GMT 2024

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

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

Back to the top