LibraryLink ToToggle FramesPrintFeedback

Modifying the Sample

Setting up Ant to build your bundle requires the following:

The bnd Ant task uses the BND control file shown in Example 4.4.

Example 4.4. OSGi BND Control File

Private-Package: demo.hw.server, org.apache.hello_world_soap_http.* 1
Import-Package: javax.jws, javax.wsdl, META-INF.cxf, org.apache.cxf.bus, org.apache.cxf.bus.spring, org.apache.cxf.bus.resource, org.apache.cxf.configuration.spring, org.apache.cxf.resource, org.springframework.beans.factory.config, * 2
Include-Resource: META-INF/spring/beans.xml=beans.xml, hello_world.wsdl=wsdl/hello_world.wsdl  3
Bundle-Version: 1.0
Require-Bundle: org.apache.cxf.cxf-bundle
DynamicImport-Package: org.apache.cxf.* 4

The BND control file specifies the following:

1

The classes implementing the service are to be added to the bundle, but not exported.

1

The packages listed in Required packages are imported by the bundle.

3

The WSDL file and the configuration are copied into the proper places in the bundle.

4

The org.apache.cxf.* packages are dynamically imported for the Spring-DM framework.

For this example, we are going to rely on Spring-DM to publish the endpoint created by the application. Spring-DM requires that a Spring XML file be placed in the bundle's META-INF/spring folder. Since FUSE Services Framework configuration files are Spring XML files, we can simply create FUSE Services Framework configuration file similar to the one shown in Example 4.5 and have it placed into the proper location in the application's bundle.


The Include-Resource statement in the BND control file shown in Example 4.4 instructs BND to copy the configuration file into the bundle's META-INF/spring folder.