Before you run the example, start Fuse ESB.
To install and run a prebuilt version of this example, enter the following command in the Fuse ESB console:
features:install examples-cxf-osgi
To build and deploy the example do the following:
If you installed the examples-cxf-osgi feature, first uninstall it by running the following from the Fuse ESB console:
features:uninstall examples-cxf-osgiIn a separate command window or terminal, change to the root folder of the example.
cdInstallDir/examples/cxf-osgiEnter the following command:
mvn installThis command will build a bundle called
cxf-osgi-4.4.1-fuse-00-08.jarand place it into thetargetfolder of the example.Copy the bundle to
to deploy it to the container.InstallDir/deploy
To see if the example is running you can visit http://localhost:8181/cxf/HelloWorld?wsdl in your Web browser. You should see the WSDL shown in Example 4.1.
Example 4.1. CXF OSGi Example WSDL
<wsdl:definitions name="HelloWorldImplService"
targetNamespace="http://cxf.examples.servicemix.apache.org/">
<wsdl:types>
<xs:schema attributeFormDefault="unqualified"
elementFormDefault="unqualified"
targetNamespace="http://cxf.examples.servicemix.apache.org/">
<xs:complexType name="sayHi">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sayHiResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="sayHi" nillable="true" type="sayHi"/>
<xs:element name="sayHiResponse" nillable="true" type="sayHiResponse"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="sayHiResponse">
<wsdl:part element="tns:sayHiResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="sayHi">
<wsdl:part element="tns:sayHi" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="HelloWorld">
<wsdl:operation name="sayHi">
<wsdl:input message="tns:sayHi" name="sayHi">
</wsdl:input>
<wsdl:output message="tns:sayHiResponse" name="sayHiResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldImplServiceSoapBinding" type="tns:HelloWorld">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="sayHi">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="sayHi">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="sayHiResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldImplService">
<wsdl:port binding="tns:HelloWorldImplServiceSoapBinding" name="HelloWorldImplPort">
<soap:address location="http://localhost:8181/cxf/HelloWorld"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>







