XFire

Home
Bug/Issue Reporting
Download
FAQ
Get Involved
License
News
Performance
Stack Comparison
Support
Who uses XFire\?
XFire Team

Documentation

Javadocs
Reports
User's Guide
Release Notes

Quicklinks

Aegis Binding
Client
JAXB 2.0
JSR 181 Annotations
Spring

Developers

Developer Space
CVS
Building
Architecture
Interesting Projects
Roadmap
Release Process
JAX\-WS

The basic structure of a configuration is like so:

<beans xmlns="http://xfire.codehaus.org/config/1.0">
  <xfire>
    <inHandlers>
      <handler handlerClass="">
      </handler>
    </inHandlers>
  </xfire>

  <service>
    <serviceName/>
    <serviceClass/>
    <implementationClass/>
    <serviceFactory/>
    <bindingProvider/>
    <style/>
    <use/>
    <soapVersion/>
    <scope/>
    <inHandlers>
      <handler handlerClass=""/>
    </inHandlers>
    <outHandlers>
      <handler handlerClass=""/>
    </outHandlers>
    <faultHandlers>
      <handler handlerClass=""/>
    </faultHandlers>
  </service>

</beans>

Service Options

Here are options common to all bindings. The sections following outline options for specific bindings.

The name element is required. This will be the name of the service as exposed to the world. You will also use this name to access the Service class from the ServiceRegistry.

<name>MyService</name>

The soapVersion is option and defaults to 1.1. Your other option is 1.2.

<soapVersion>1.2</soapVersion>

The style element is required. Services can be of style wrapped, document, or rpc.

<style>wrapped</style>

The "use" element is optional and defaults to "literal". This determines the encoding type and can be either encoded or literal. Only literal services are supported currently.

<use>literal</use>

The class name of the object you wish to make into a service. Required.

<serviceClass>org.codehaus.xfire.HelloService</serviceClass>

The class name of the implementation which you wish to use when the service is invoked. Optional.

<implementationClass>org.codehaus.xfire.HelloServiceImpl</implementationClass>

The ServiceFactory controls how the Service is built and configured. Optional.

<serviceFactory>your.service.builder.class</serviceFactory>

To use the Java 5 JSR 181 Service factory

<serviceFactory>jsr181</serviceFactory>

To use the Commons-Attributes JSR 181 Service factory

<serviceFactory>commons-attributes</serviceFactory>

If you are using XMLBeans, you will want to specify "<serviceFactory>org.codehaus.xfire.xmlbeans.XmlBeansServiceFactory</serviceFactory>".

The path to the WSDL file for your service. Optional.

<wsdlURL>file:///location/of/wsdl</wsdlURL>

The scope element is optional. Specify "application" to have your service object persist indefinitely, "session" to have one service object per session, and "request" to create a new service object for every request. The default is "application".

<scope>session</scope>

Handlers

You may want to add request, response or fault handlers to your service. To do this use the <requestHandlers>, <responseHandlers> or <faultHandlers> sections:

<service>
  <inHandlers>
    <handler handlerClass="your.custom.handler.Class"/>
  </inHandlers>
</service>

Service Properties

Name Type Default Description
wsdlBuilder.generateImports String false Specifies whether or not the WSDLBuilder should generate imports for all the schemas in your WSDL. Necessary with some tools.
wsdlBuilder.cleanImports String true Specifies whether or not the WSDLBuilder should remove the schemaLocations from schemas which are added to the WSDLBuilder.
wsdlBuilder.removeAllImports String false Specifies whether or not the WSDLBuilder should remove all the imports from the schemas. This turns both the import generation and cleaning off.