Fuse Services Framework leverages the Spring framework to inject configuration information into the runtime when it starts up. The XML configuration file used to configure applications is a Spring XML file that contains some Fuse Services Framework specific elements.
Spring is a layered Java/J2EE application framework. Fuse Services Framework leverages the Spring core and uses the principles of Inversion of Control and Dependency Injection.
For more information on the Spring framework, see http://www.springframework.org. Of particular relevance is Chapter 3 of the Spring reference guide, The IoC container.
For more information on inversion of control and dependency injection, see http://martinfowler.com/articles/injection.html.
The core Fuse Services Framework configuration elements are defined in the
http://cxf.apache.org/jaxws
namespace. You must add the entry shown in
Example 1.1 to the beans
element of your configuration
file.
Advanced features, like WS-Addressing and WS-RM, require the use of elements in other namespaces. The SOAP and JMS transports also use elements defined in different namespaces. You must add those namspaces when configuring those features.
Spring XML files use the beans
element's xsi:schemaLocation
attribute to locate the schemas required to validate the elements used in the document. The
xsi:schemaLocation
attribute is a list of namespaces, and the schema in which the namespace
is defined. Each namespace/schema combination is defined as a space delimited pair.
You should add the Fuse Services Framework's configuration schemas to the list of schemas in the attribute as shown in Example 1.2.
Example 1.2. Adding the JAX-WS Schema to the Configuration File
<beans ... xsi:schemaLocation=" ... http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd ...">
The bean id cxf
is reserved by the default Apache CXF bus. If
you define a bean using the id cxf
it will override the default
bus implementation and can make the runtime unstable.
Example 1.3 shows a simplified example of a Fuse Services Framework configuration file.
Example 1.3. Fuse Services Framework Configuration File
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
... xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd"> <!-- your configuration goes here! -->
</beans>
The following describes Example 1.3:
A Fuse Services Framework configuration file is actually a Spring XML file. You must include an
opening Spring | |
Before using the Fuse Services Framework configuration elements, you must declare its namespace in the configuration's root element. | |
In order for the runtime and the tooling to ensure that your configuration file is valid, you need to add the proper entries to the schema location list. | |
The contents of the configuration depends on the behavior you want exhibited by the runtime. You can use:
|