You can make the configuration file available to the FUSE Services Framework runtime in one of the following ways:
Name the configuration file cxf.xml
and add it your CLASSPATH
.
Use one of the following command-line flags to point to the configuration file:
-Dcxf.config.file=myCfgResource
-Dcxf.config.file.url=myCfgURL
This allows you to save the configuration file anywhere on your system and avoid adding it to your
CLASSPATH
. It also means you can give your configuration file any name you want.
This is a useful approach for portable JAX-WS applications. It is also the method used in most of the
FUSE Services Framework samples. For example, in the WS-Addressing sample, located in the
directory, the server start command
specifies the InstallDir
/samples/ws-addressingserver.xml
configuration file as follows:
java -Dcxf.config.file=server.xml demo.ws_addressing.server.Server
![]() | Note |
---|---|
In this example, the start command is run from the directory in which the |
Programmatically, by creating a bus and passing the configuration file location as either a URL or string. For example:
(new SpringBusFactory()).createBus(URLmyCfgURL
) (new SpringBusFactory()).createBus(StringmyCfgResource
)