On this page, we are going to configure the cxf-se-su service unit to provide our service .
Configuring pom.xml
Changing the project name
In order to make the build output a little bit more comprehensible, we first change the project name in the generated pom.xml file.
Adding version of cxf to pom.xml
We must specify version of CXF.
Adding org.apache.cxf plugin
We add this plugin to the generated pom.xml file to element plugins.
This plugin is use for generating java classes from WSDL file. We use wsdl2java tool from JAX-WS (CXF framework).
Where service.wsdl is WSDL file, which we made in my-cxf-bc-su. We must copy this WSDL file from my-cxf-bc-su/src/main/resources to
my-cxf-se-su/src/main/resources.
Implementing generated ExampleService.java
We must implement our service in java. In our example, it's HelloImpl.java
Configuring xbean.xml
Next, we will have to configure our new SU to really provide some services. We do this by modifying the file named xbean.xml in the src/main/resources directory of our my-cxf-se-su module.
Next, we are going to create service assembly.
Things to remember
- You specify the plugin for a SU in Maven's pom.xml file
- In ServiceMix, most service units will be configured by a file named xbean.xml