On this page, we are going to configure the my-cxf-bc-su 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.
<project> ... <name>CXF WSDL Tutorial :: CXF BC SU</name> ... </project>
Adding parent's element to generated pom.xml
We must specify parent of this project. So, we add this to generated pom.xml.
<parent> <artifactId>parent</artifactId> <groupId>org.apache.servicemix.tutorial</groupId> <version>1.0-SNAPSHOT</version> </parent>
Editing service.wsdl to provide our service
We must edit WSDL file service.wsdl in src/main/resources directory to provide our service. Here is example for method hello.
Configuring xbean.xml
Next, we will have to configure our new SU to really provide some services. We do this by creating a file named xbean.xml in the src/main/resources directory of our my-cxf-bc-su module. We must fill in it according to service.wsdl. Here is example for our service.wsdl.
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0" xmlns:hello="http://servicemix.apache.org/samples/hello"> <cxfbc:consumer wsdl="classpath:service.wsdl" targetService="hello:HelloService" targetInterface="hello:Hello"/> </beans>
Next, we are going to create our service assembly.
Things to remember
- In ServiceMix, most service units will be configured by a file named xbean.xml