Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » How to get scout server services outside the scout client scope?
How to get scout server services outside the scout client scope? [message #1691022] Wed, 01 April 2015 15:45 Go to next message
Nejc Gasper is currently offline Nejc GasperFriend
Messages: 55
Registered: July 2014
Member
I am trying to make a simple smoke test bundle for client that is trying to get a scout server service using the standard method (SERVICES.getService). I always get null so I guess I am either missing some imports on bundle or there is something in how Scout works that prevents me from doing this from outside. I cannot do the standard osgi get service since the service is not local and I only get some proxy I don't know what to do with.
I know this is non-standard and possibly wrong, so if someone has an idea what I have to do to make it work, please do. What would also be good is another simple way to make a smoke test. I know I can just get the URL and see if it returns but I'd like to call a few services too so maybe a simple servlet?

p.s. my smoke test needs to do some checks on both client and server to see if things are working fine (sanity check for deploy).
Re: How to get scout server services outside the scout client scope? [message #1692907 is a reply to message #1691022] Mon, 20 April 2015 14:05 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
You can call the Server URL from a Browser. Example:
http://localhost:8080/minicrm_server/process
You will get the HTML answer provided by ServiceTunnelServlet
See: ServiceTunnelServlet.doGet(HttpServletRequest, HttpServletResponse)

You might also be intersted in: diagnostic Servlet
You can write your own IDiagnostic and register it.

If you want to write your own servlet, check: custom servlet.
If you want to use SERVICES.getService(..) in your custom servlet, you should check this thread:
Custom Servlet => use SERVICES.getService(..)

.
Re: How to get scout server services outside the scout client scope? [message #1693005 is a reply to message #1692907] Tue, 21 April 2015 08:17 Go to previous messageGo to next message
Nejc Gasper is currently offline Nejc GasperFriend
Messages: 55
Registered: July 2014
Member
Great, the last link looks like exactly what I need. I will try implementing this soon, but it is somewhere along the lines I expected the solution to be Smile Thanks!

Also the diagnostic servlet looks nice, maybe I can even use that and scrap my work, yep. Still good to know the other thing though, since we are branching and I will soon need to implement a REST service outside the context.

p.s. (offtopic) Oh btw is anyone interested, i've integrated JAX-RS using Jersey&Jackson pure OSGi style (or mostly). Doesn't seem that hard now, but might help someone (Also some external review could uncover flaws). Where can I post that?
Re: How to get scout server services outside the scout client scope? [message #1693035 is a reply to message #1693005] Tue, 21 April 2015 11:24 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Nejc Gasper wrote on Tue, 21 April 2015 10:17
p.s. (offtopic) Oh btw is anyone interested, i've integrated JAX-RS using Jersey&Jackson pure OSGi style (or mostly). Doesn't seem that hard now, but might help someone (Also some external review could uncover flaws). Where can I post that?


What about a new small GitHub project? In my opinion this is the easiest way.

I think that a lot of people are intersted.
Previous Topic:DataSourceSecurityFilter
Next Topic:Disable one of the built in security filters?
Goto Forum:
  


Current Time: Sat Jul 27 01:57:56 GMT 2024

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

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

Back to the top