XFireHome M5M6-SNAPSHOTDevelopersDeveloper Space |
The basic structure of a configuration is like so: <xfire> <services> <service> <serviceName/> <serviceClass/> <implementationClass/> <serviceFactory/> <bindingProvider/> <style/> <use/> <soapVersion/> <scope/> <inHandlers> <handler/> </inHandlers> <outHandlers> <handler/> </outHandlers> <faultHandlers> <handler/> </faultHandlers> </service> </services> </xfire> Service OptionsHere 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>true</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> HandlersYou may want to add request, response or fault handlers to your service. To do this use the <requestHandlers>, <responseHandlers> or <faultHandlers> sections: <service> <requestHandlers> <handler>your.custom.handler.Class</handler> </requestHandlers> </service> |