Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

anchortoptop

CXF examples

This example leverages CXF and Spring-DM to create a web service and expose it through the OSGi HTTP Service.

...

When inside the console, just run the following commands:

...

If you get the error below it may be due to a recent change in the latest GShell - see SMX4-153

...

...

The new syntax is:

...

...

At this point, it will certainly fail if you don't have the examples inside your local repository. This is because all the required bundles are not released yet and SNAPSHOTs are not published in maven public repositories. To pass this step, you'll have to build ServiceMix 4 (see Building).

...

Just open your browser and go to the following url:

...

It should display the WSDL of the service (if you use Safari, make sure to right click the window and select 'Show Source', else the page will be blank).
Or you can also test it from ServiceMix console using"

...

How does it work ?

The installation leverages ServiceMix Kernel by installing what's called 'features'. You can see the features definition file using the following command inside ServiceMix console:

...

...

The list of available features can be obtained using:

...

Inside the example

This example leverages CXF and Spring-DM to create a web service.

The bundle for this example is quite simple and it contains two classes for the service definition and the spring definition file.

...

Note that we use the OSGi transport so that this web service will be exposed through the standard OSGi HTTP service.

Also, you need to make sure the MANIFEST contains the needed OSGi headers, in our case:

...

...

Exposing the service to ServiceMix internal bus

...

Source code for this example is available at the following location:

...

#top

...