HI All
I am thinking to create separate project for service client , these screenshots shows the wizards steps to create that client. But Now I have following questions in my mind.
According to my findings, service consumer can be created using following code sample (with r-osgi provider)
BundleContext context = Platform.getBundle(Activator.PLUGIN_ID).getBundleContext();
ServiceTracker containerManagerServiceTracker = new ServiceTracker(context, IContainerManager.class.getName(),null);
containerManagerServiceTracker.open();
IContainer containerManager = (IContainerManager) containerManagerServiceTracker.getService();
container = containerManager.getContainerFactory().createContainer("ecf.r_osgi.peer");
IRemoteServiceContainerAdapter containerAdapter = (IRemoteServiceContainerAdapter) container
.getAdapter(IRemoteServiceContainerAdapter.class);
IRemoteServiceReference[] helloReferences = containerAdapter
.getRemoteServiceReferences(IDFactory.getDefault().createID(container.getConnectNamespace(),
serviceURL), interfaceName, null);
IRemoteService remoteService = containerAdapter.getRemoteService(helloReferences[0]);
1) I tried out this code sample and it's working for me, But here I need Bundle Context So always service consumer should be a bundle is it? if not how can I get the bundle context ??
2) Where can I find list of available providers. ecf.generic.client/server and ecf.r_osgi.peer .etc??
PS: @Markus
during this week I couldn’t do good progress since I was completely down due to fever, Hopefully complete all the existing works by Monday(2nd Sep) will send complete update mail.
BTW , Still I feel my all my local changes are not sync with the Github, Can u see following class and packages
package org.eclipse.ecf.tools.serviceGenerator.wizards
RemoteServiceClientGenWizard.java
RemoteServiceClientGenWizardPage.java
JavaProjectUtils.java
Thanks and Regards
Salinda