You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

servicemix-cxf-se

ServiceMix Cxf Se component is a JBI Service Engine exposing (annotated) POJO as services on the JBI Bus.
It uses apache cxf internally to perform service invocations and xml marshaling.

Features:

  • jsr181 annotations
  • aegis binding
  • jaxb2 binding
  • wsdl auto generation
  • MTOM / attachments support

Installation

Installing the servicemix-cxf-se component can be done in several ways:

  • drop the installer zip in an hotdeploy directory monitored by ServiceMix
  • using ant tasks

Note that when using ant tasks, the component is not started, you will have to start it manually using ant tasks or a console.

Deployment

You can deploy Service Units containing a file named xbean.xml for activating consumer and provider endpoints.

This xml file should respect the given syntax, though this is a spring based xml configuration file from where all beans of class
See a full example here.  Note that you have to define the cxf-se namespace with

<beans xmlns:cxfse="http://servicemix.apache.org/cxfse/1.0">
    ...
</beans>

Any numbers of endpoints can be specified in the xbean.xml file.

As the main purpose is to expose a POJO, you will have to include the needed class files / jars in the service unit and reference them using the following tags in your xbean.xml configuration file:

<classpath>
  <location>.</location>
</classpath>

This will add the content of the location tags (relative to the unzipped service unit) to the classpath. The previous configuration will just add the class files contained in the service unit, as if it is a plain jar.

If you want to embed jars, just use something like

<classpath>
  <location>lib/foo.jar</location>
</classpath>
  • No labels