Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Creating custom API/web service?
Creating custom API/web service? [message #1781996] Thu, 15 February 2018 15:07 Go to next message
M A is currently offline M AFriend
Messages: 4
Registered: February 2018
Junior Member
Hey,

Im trying to setup a web service within Kura so that I can create my own custom API for different stuff. I have been googling around but couldn't find anything helpful. What would be the best way to setup a custom API within Kura?
Re: Creating custom API/web service? [message #1783834 is a reply to message #1781996] Mon, 19 March 2018 01:21 Go to previous messageGo to next message
paul stanton is currently offline paul stantonFriend
Messages: 87
Registered: July 2009
Member
if you mean a custom web app, it is possible however not very good (for want of a better description).

look for "org.osgi.service.http.HttpContext"

You can create pseudo-servlets which load resources from within the jar. it's quite tricky but possible.
Re: Creating custom API/web service? [message #1785121 is a reply to message #1783834] Mon, 09 April 2018 17:32 Go to previous message
Aistis Kaikaris is currently offline Aistis KaikarisFriend
Messages: 33
Registered: March 2018
Member
paul stanton wrote on Mon, 19 March 2018 03:21
if you mean a custom web app, it is possible however not very good (for want of a better description).

look for "org.osgi.service.http.HttpContext"

You can create pseudo-servlets which load resources from within the jar. it's quite tricky but possible.


What would be a good solution? I have been trying to figure out how to setup a web app on a kura device for over a week now.

Most new osgi examples on the internet use declarative services with annotations, but i haven't figured out how to make the annotations do anything or if the kura environment even supports them. Others are 6 to 10 years old and seem to be using listeners instead of the HTTP whiteboard approach. I can make those work, but the webpage cannot find it's resources then.

Is kura just not meant for these types of things?
Previous Topic:Loading Modbus assets and channels
Next Topic:Multiple Instance of Kura
Goto Forum:
  


Current Time: Thu Apr 25 14:18:11 GMT 2024

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

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

Back to the top