Contact Free trial Login

About the XML Configuration File

Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version.

Use Spring XML files with custom Mule namespaces to configure Mule applications.

XML Schema

In a Mule application, you specify the Spring XML schema files in the header.

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns=""

Be sure to specify all the necessary schema files. This can be time-consuming when setting up the configuration file, but importing schema files provides the following time-saving benefits:

  • Auto-completion and context-specific help in your favorite IDE

  • Design-time configuration validation

  • Typed properties


Each Mule module or transport has its own XML schema. When you import a schema, it has its own namespace.

To use the standard Spring elements, import one of two standard Spring namespaces:

Default Namespace

Typically, you set the Mule core schema as the default namespace for your configuration file. This means that any XML element without a prefix will come from the Mule core schema, (mule.xsd). To set the default namespace schema, specify xmlns immediately followed by the URL of the Mule schema, without the colon or namespace prefix you set in the previous example (e.g., xmlns instead of xmlns:jms):

<mule xmlns=""

Spring Bean Profile Definitions

Although your configuration files appear to be Mule-specific, they are really just Spring configuration files with Mule-specific extensions. This approach allows you to use anything Spring offers within your Mule configuration, such as beans, factory beans, bean profile definitions, resource loaders, EJBs, JNDI, AOP, and even integration with other software such as jBPM, Gigaspaces, JBoss Rules, etc.

    <spring:bean id="myBean" class="com.acme.CoolBean">
        <spring:property name="sessionFactory">
            <spring:ref local="mySessionFactory" />
        <spring:property name="configuration">

Merging Configuration Files

If you have multiple configuration files, you can import them into one configuration file so that you only have to specify one configuration. For example:

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns= ....>
    <spring:import resource="mule-sub-config1.xml" />
    <spring:import resource="mule-sub-config2.xml" />

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub