hy!

i would like to use Tuscany to expose services from my OSGi-Bundles,
but i
get a BundleException, because Felix can't resolve org.osgi.framework. I
thougth a OSGi-Container would provide this package - isn't it so?
I tested my OSGi-Bundle with Eclipse/Equinox and it worked fine.

My project consists of following files,


osgi-service.composite:

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0";
   name="SomeComposite">
      <component name="SomeComponent">
         <t:implementation.osgi
            bundleSymbolicName="com.sample.myBundle" />
      </component>
</composite>


com.sample.myBundle.componentType:

<?xml version="1.0" encoding="UTF-8"?>
<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0";
   xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0";>
   <service name="com.sample.SomeService">
      <interface.java
         interface="com.sample.SomeServiceInterface" />
   </service>
</componentType>


and a Main-Class with the following main-method:

public static void main(String[] args) {
   SCADomain domain = SCADomain.newInstance("osgi-service.composite");
   MotdService service = domain.getService(MotdService.class,
      "SomeComponent/com.sample.SomeService");

   /* do something with the service */
}


Does anybody knows whats my problem? do i have to provide a bundle,
which exports the org.osgi.framework package myself?

Thx for your answers,
Eugene






Reply via email to