title: Register a OSGI service and get that OSGI service refrence using WSO2 Product
body: <p>Actually i want to migrate my application from FUSE ESB to WSO2esb.
  In my FUSE application, i have created a OSGI bundle for Logger and register Logger service in OSGI registry.Other OSGI bundle can get that OSGI service through reference of it.</p>
  
  <p>I have created one OSGI maven Project for Logger using servicemix-camel-osgi artifactId.
  I've using Apache Camel Approach so created one MainRoute xml file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:camel="http://camel.apache.org/schema/spring"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:osgi="http://www.springframework.org/schema/osgi"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
         http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd"&gt;
  
  
      &lt;bean id="Logger" class="com.logging.LoggerImpl" factory-method="getInstance"&gt;&lt;/bean&gt;
      &lt;osgi:service id="LoggerService" ref="Logger" interface="com.logging.Logger"&gt;&lt;/osgi:service&gt;
  
    &lt;camelContext autoStartup="true" xmlns="http://camel.apache.org/schema/spring"/&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>In this file i've created Spring bean of LoggerImpl Class and register it as OSGI service using SpringDM.
  Then i've created other Maven Project of ABC using servicemix-camel-osgi artifactId and in that project i've created one route file.
  it's looks like :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:camel="http://camel.apache.org/schema/spring" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://www.springframework.org/schema/osgi"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
         http://www.springframework.org/schema/osgi  
         http://www.springframework.org/schema/osgi/spring-osgi.xsd"&gt;
  
      &lt;import resource="classpath:spring-beans.xml" /&gt;
  
      &lt;osgi:reference id="util_logger" interface="com.logging.Logger" bean-name="Logger"&gt;&lt;/osgi:reference&gt;
      &lt;camelContext trace="false" xmlns="http://camel.apache.org/schema/spring"/&gt;
  
  &lt;/bean&gt;
  </code></pre>
  
  <p>so as shown in above file i've getting Logger service using OSGI Refrence.</p>
  
  <p>Main motive for doing this is when i Register Logger OSGI service in Registry then any OSGI bundle can use that service using Reference of it rather than importing the package.
  Same thing want to implement in WSO2 but can't get any solution.</p>
  
  <p>If any solution or suggestion then please suggest me, so i can achieve it.
  Thanks.</p>