Hi, I'm quite new to (Distributed)-OSGI and after reading the DOSGI-Documentation on the apache-cxf-homepage I still have some questions left (both generally if using cxf is the right choice in my situation and some technical questions). Here is what I'm planning to do:
I'm implementing an Eclipse RCP-Application that stores it's model to a (oracle)-DB using eclipselink. For this persistence I implemented an eclipse-plugin that "converts" my model-objects to DB-persistence-Objects and writes/reads them to my DB using the jdbc-driver. In a first version, I managed to bundle this "resourcemanager" plugin with my rcp application and everything seems to work fine. Since the jdbc-protocol between this rich-client and my database-server could produce problems traversing firewalls I'd like to optionally put my resource-manager plugin to a server near the database and to the access between the Rich-client and the resourcemanager over the network using webservices. Anyway it should be possible to bundle the same resourcemanager directly with the rcp-application in some lightweight situations. So I thought of writing a webservice-proxy on the rcp-side that can be loaded like the direct db-resourcemanager by the rcp-app and that forwards the requests to a ws-server that itself forwards this request to the original osgi-db-plugin: RCP-Application --------as EclipsePlugin ----------> WS-Proxy ---------via webservice ---------->Webserver(Webservice)--------like eclipseplugin------->orgResourceManager I wonder if I could use dosgi and cxf to provide ws-proxy and webserver. If I understood this concepts right, it is quite easy to generate a webservice with a wsdl for an osgi-service like my org. resourceManager. I can then configure the WS-Proxy by specifying an XML-File saying where the Webservice is located and everything should work (worked for a small sample I tried). But is it possible to specify the URL of the Webservice in the RCP-App-GUI instead of statically in the XML-File? Service-lookup-services aren't the way to use here, are they? Another thing is about authentication between the Application and the Webserver. My idea would be that the webserver manages authentication using a ldap-server or using some simple "password-file"-method. The RCP-User should then provide username/Pw and ws-proxy and webserver should check if the username/pw is correct. Could this be achieved with CXF and WS-Security? And are there some documents how to achieve this? Or is it possible to host the osgi-webservice and my osgi-resourcemanager in some kind of application-server for managing things like security and eventually persistence (Or should I just use the ecliipselink-osgi-bundles). Is Apache CXF and DOSGI the right way to reach my goals? Or would It be better to use an osgi-app-server as glassfish v3 and use it's webservice-facilities (metro). (I'm new to this also but maybe it would be better to search for a solution using these technologies?) I read about a third way in a paper on exposing eclipse-plugins as webservices using axis1 by IBM from 2006 using tomcat to serve the osgi-environment, but this seems to be quite ugly :-( And axis2 with osgi needs lots of manual building so I think this too isn't the best solution. Any help or thoughts on these issues would be highly appreciated, bet regards Johannes
