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
Warning
titleWarning

This component has been deprecated in favor to servicemix-http and servicemix-jsr181 component,
which also use the XFire soap stack.

Introduction

ServiceMix provides support for the XFire SOAP stack, allowing clean integration between XFire and ServiceMix. XFire is an easy-to-use SOAP framework that offers high performance.

Before reviewing the partial example below, it is strongly recommended that you read the Spring XFire instructions.

Steps to Integrate with XFire

The first step is to create a service bean, for example:

Code Block
java
java
package org.servicemix.components.xfire;

public class Echo {
    public String echo(String msg) {
        return msg;
    }
}

Next, define this service bean in your bean definitions:

Code Block
xml
xml
<!-- The Service Bean -->
  <bean id="echo" class="org.servicemix.components.xfire.Echo" singleton="true"/>

  <bean name="Echo" class="org.codehaus.xfire.spring.ServiceBean">
    <property name="service" ref="echo"/>
    <property name="serviceFactory" ref="xfire.serviceFactory"/>
    <property name="xfire" ref="xfire"/>
  </bean>

Then, to expose your service on the JBI bus, register a JBI binding for the service:

Wiki Markup
{snippet:id=xfire|lang=xml|url=servicemix/smx3/trunk/common/servicemix-components/src/test/resources/org/apache/servicemix/components/xfire/xfire-inout.xml}

Location of the ServiceMix XFire Components

  • The source code for the ServiceMix 3.x XFire components can be found at:
    [servicemix_src_install_dir]\servicemix-components\src\main\java\org\apache\servicemix\components\xfire
    where [servicemix_src_install_dir] is the directory in which ServiceMix is installed.
  • The source code for the ServiceMix 2.0.x XFire components can be found at:
    [servicemix_src_install_dir]\components\base\src\main\java\org\servicemix\components\xfire
    where [servicemix_src_install_dir] is the directory in which ServiceMix is installed.

Additional Resources

For details on XFire, please refer to XFire SOAP stack.