[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [ecf-dev] rest and soap additions to remoteservice | 
For people's information, I just created a 'dictionary' remote service 
soap client provider and committed it to ecf1.osuosl.org (see below for 
more information). 
Here are the steps that I went through to create this dictionary soap 
client provider:
1) Get the wsdl for the Aona DictService from here 
http://services.aonaware.com/DictService/DictService.asmx
2) Run Axis 1.4 wsdl2java to create java axis client code.
3) Create a *very* simple service API bundle:  
org.eclipse.ecf.examples.remoteservice.dictionary.common with just two 
classes:
 IDictionary - service interface for OSGi dictionary remote service 
with a single method 'define' to lookup the definition for a given word.
 WordDefinition - The return type returned from a dictionary lookup 
(referenced in IDictionary.define method).
4) Created a new provider bundle with name:  
org.eclipse.ecf.examples.provider.dictionary.soap.client
5) Copied the code from 2 (and supporting libraries) into the new 
provider bundle
6) Created/added these three ECF classes to the provider bundle:
  DictionarySoapClientContainer - The provider's container class
  DictionarySoapClientContainerInstantiator - The containerFactory 
implmentation
  DictionarySoapClientService - The service implementation class.
See the DictionarySoapClientService to see the code that uses the axis 
client to make the actual remote call.
7) Added ecf containerFactory extension (that points to the 
DictionarySoapClientContainerInstantiator).
And it's done (!).   Two bundles (the service API bundle and the 
provider), total of 5 non-generated classes.
I also wrote a very small/simple test case (in 
org.eclipse.ecf.examples.tests.remoteservices.dictionary.soap.client 
bundle) to test it out.
When I can, I'll document this on the ECF wiki and then blog about it.  
If others would like to enhance it to use more/other of the DictService 
methods, please feel free.
Thanks,
Scott
CVS info for ecf1.osuosl.org:
Anonymous access:
:pserver:anonymous@xxxxxxxxxxxxxxx:/ecf
extssh access:
:extssh:ecf1.osuosl.org:/home/cvs/ecf
These three bundles (the service API bundle, the provider bundle and the 
test bundle) are under this module:
/examples/bundles