You can make the configuration file available to the Fuse Services Framework runtime in one of the following ways:
Using a command line flags to point to the configuration file.
Loading the configuration when you instantiate the bus in your application code.
![]() | Important |
|---|---|
You should not name your configuration file |
When starting a service you can use one of the following command-line flags to point to the configuration file:
-Dcxf.config.file=— specifies the configuration file using a file pathmyCfgResource-Dcxf.config.file.url=— specifies the configuration file using a URLmyCfgURL
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 shown in Example 1.4.
Example 1.4. Specifying a Configuration on the Command Line
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
|
When you create a bus you can specify the configuration file location. The APIs shown in Example 1.5 allow you to specify the configuration file using either a URL or a file path.
Example 1.5. APIs for Specifying the Configuration File
(new SpringBusFactory()).createBus(URLmyCfgURL) (new SpringBusFactory()).createBus(StringmyCfgResource)
For more information on developing Web services see Developing Applications Using JAX-WS.






![[Important]](imagesdb/important.gif)
![[Note]](imagesdb/note.gif)


