Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Communications Framework (ECF) » Use of remote service client API with non OSGI-services(Any hints or examples ?)
Use of remote service client API with non OSGI-services [message #1485606] Mon, 24 November 2014 11:32 Go to next message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
Hello,

In this (already a bit older) blogpost (http://eclipseecf.blogspot.be/2010/01/soap-rest-and-ecf-remote-services.html) I found out about the existence of org.eclipse.ecf.remoteservice.client API, which should enable an OSGI-based client to consume restful services as if they were OSGi (ideally declarative) services.

I would like to try this out in a RCP application, but apart from javadoc I didn't find any examples on how to get started with this client-library : all examples I've found have clients interacting with "authentic" OSGI service providers.

Any hints, of code example on this ?

Thanks a lot,

Thomas Elskens
Re: Use of remote service client API with non OSGI-services [message #1486111 is a reply to message #1485606] Mon, 24 November 2014 20:47 Go to previous messageGo to next message
Scott Lewis is currently offline Scott LewisFriend
Messages: 1030
Registered: July 2009
Senior Member
Hi Thomas,

Your questions about the client API are rather timely. Why timely? Because although we have tutorials and examples that show how to create custom providers...e.g.

http://wiki.eclipse.org/Tutorial:_Creating_a_RESTful_Remote_Service_Provider

we do *not* yet have a tutorial/examples that show how to create a client-only provider to interact with a non-OSGi hosted service (e.g. an existing REST, SOAP, or other service). In October, I actually have proposed that I create such a tutorial myself on the ECF dev mailing list:

http://dev.eclipse.org/mhonarc/lists/ecf-dev/msg07317.html

As you can see by reading the responses to this thread, there were some really good ideas of an existing service that could be used for this example/tutorial, but as of right now I haven't actually decided what service I would focus on for the example/tutorial.

BTW, there was an example client that interacted with an old version of the Twitter service some years ago (before they changed the twitter authentication) in ECF test code here:

http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/tests/bundles/org.eclipse.ecf.tests.remoteservice.rest/src/org/eclipse/ecf/tests/remoteservice/rest/twitter

One issue for me doing this work immediately is that I don't currently have support (read $$) for work on ECF, and so can't dedicate as much time to it as I would like.

But to summarize: I am thinking of working on such a tutorial/example, but need to figure out

1) How I can dedicate some paid work time to such an effort
2) Which existing service to create a client provider for
3) Get some assistance from other in the ECF community in creating the examples and tutorial

If you have ideas or could contribute to any of 1-3 then it certainly could move things along. You might want to jump in on the ecf-dev thread discussing which existing service to us (2). To join the ecf-dev mailing list go here:

https://dev.eclipse.org/mailman/listinfo/ecf-dev







Re: Use of remote service client API with non OSGI-services [message #1490655 is a reply to message #1486111] Fri, 28 November 2014 10:19 Go to previous message
Thomas Elskens is currently offline Thomas ElskensFriend
Messages: 159
Registered: September 2014
Location: Brussels - Belgium
Senior Member
Hello,

I proposed a little idea on the mailing list. But in the meanwhile, I don't quite understand the API of the remote client.

As far as my understanding goes :

  • First I've to instantiate a RestClientContainer with the targetID of the webservice server
  • then I register some Callables with it and save this registration in a IRemoteServiceRegistration
  • I have to instantiate a RestClientService. All methods of this class are protected, so I have to extend it. Parameters of the constructor are the container and ServiceRegistration previously instantiated.

So far so good, I guess.

The main method of interest in the RestClientService is invokeRemoteCall(IRemoteCall call, IRemoteCallable callable). Here I'm stuck : the first argument can be created with RestCallFactory, but what about the callable ?
The only way I can think of getting to a callable at this point is to write
this.invokeRemoteCall(call, this.registration.lookupCallable(call))
but this doesn't seem very meaningful ?

Or am I mistaken alltogether about the way I should use the class RestClientService ?

Thomas Elskens
Previous Topic:Type of bootstrapping Architechture in OM2M
Next Topic:Problems with ZooDiscovery
Goto Forum:
  


Current Time: Tue Sep 18 22:56:12 GMT 2018

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

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

Back to the top