5 Replies Latest reply on May 30, 2012 4:05 AM by ffang

    Register a external service in osgi registry

    dhsingh07

      Hi,I am trying to use OSGI service registry, I am able to register service in osgi registry by creating and deploying osgi bundle.

      but I need to register a external web service. so if I have only wsdl url(http://dksingh:8080/helloworld?wsdl).

      How can register service in OSGI service registry?

        • 1. Re: Register a external service in osgi registry
          davsclaus

          I am not sure I understand your question.

           

          Are you using CXF to expose a web-service, and you want the location of this webservice to be registered in the OSGi service registry?

          • 2. Re: Register a external service in osgi registry
            dhsingh07

            yes you are right,

            I am exposing a webservice using CXF and now I want to register the wsdl URL of that webservice to OSGI service registry.

            • 3. Re: Register a external service in osgi registry
              ffang

              Hi,

               

              You needn't register that OSGi service yourself.

              CXF bundle already export a OSGi service which implement org.apache.cxf.transport.http.DestinationRegistry interface.

              In the DestinationRegistryImpl class it maintain a map for all destinations, so if you already expose webservice using CXF, you should be able to find any thing about that webservice from DestinationRegistryImpl. So you just need refer DestinationRegistry OSGi service which CXF bundle already register for you.

               

              Freeman

              • 4. Re: Register a external service in osgi registry
                dhsingh07

                Hi,

                 

                Thanks for your reply.

                But I have one another use case i.e. I need to register a SOAP based web service which is deployed on one remote server (say tomcat) and i don't have access to the java code of that web service and I just have the wsdl url of that web service.

                 

                Now I need to register this service( WSDL URL) in osgi service registry.

                 

                Ques:-->

                1-Does OSGI service registry provide this capability to register an external wsdl url.

                (e.g Mule Galaxy service registry does provide this functionality to register wsdl url.)

                2-If yes, please let us know the approach approach for the same for osgi service registry.

                • 5. Re: Register a external service in osgi registry
                  ffang

                  Hi,

                   

                  NO, OSGi service registry doesn't provide the capability of registering a URL directly.

                  OSGi service are all normal JAVA interface implementations(normal java object),  so you can define a JAVA interface and implement it where you can maintain a service/wsdl map yourself and then register it as OSGi service.

                   

                  Freeman