Skip to main content



      Home
Home » Eclipse Projects » Kura » Creating custom API/web service?
Creating custom API/web service? [message #1781996] Thu, 15 February 2018 10:07 Go to next message
Eclipse UserFriend
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] Sun, 18 March 2018 21:21 Go to previous messageGo to next message
Eclipse UserFriend
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 13:32 Go to previous message
Eclipse UserFriend
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: Tue Jun 24 19:46:25 EDT 2025

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

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

Back to the top