|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
| Scott Lewis
Registered: July 2009
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.
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:
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:
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:
|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
| Thomas Elskens
Registered: September 2014
Location: Brussels - Belgium
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
but this doesn't seem very meaningful ?
Or am I mistaken alltogether about the way I should use the class RestClientService ?
Powered by FUDForum
. Page generated in 0.01642 seconds