Access Keys:
Skip to content (Access Key - 0)

Examples

The easiest way to start using Mule is to walk through an example. Click a link below to learn how to get up and running with that example.

Running the Examples

The fastest approach is to run the examples from the command line. In this case, you will simply type the name of a batch script (such as hello for the Hello World example), and the example will run. Most of the examples can be run this way, but some require that you build them. See each example's page for details. Be sure you have completed all the instructions in Installing Mule before you attempt to run the example.

Building the Examples

There are two versions of each example that you can build: an Ant example, which just requires Ant 1.6.5 or later, and a Maven example, which requires Maven 2.0.9 or later and depends on the downloading of third-party JAR files. Follow all the instructions in Installing Mule to install Ant or Maven, set up your environment, install Mule, and populate the Maven repository (for Mule Enterprise users). To run an example in Eclipse, see Setting Up Eclipse.

Available Examples

Example Description
Echo Example A simple example that demonstrates how to expose a service component over multiple transports.
Hello World Example Shows how to configure multiple service components to interact on a single request and how to manage event transformations. There is a good article on DevX that describes how to get started with Mule using the Hello World Example.
Stock Quote Example This example demonstrates how to invoke an ASPX web service from Mule, transform the result using XSLT, and deserialize the result to a StockQuote Java bean. The example demonstrates invoking the service using REST and SOAP. There is also a Tutorial based on the Stock Quote example to help you get started with modifying a Mule application.
Error Handler Example The error handler example demonstrates using Spring beans as Mule service component implementations and how to publish messages to multiple outbound endpoints.
Scripting Example Demonstrates Mule support for JSR-223 scripting.
Loan Broker Example The Loan Broker example application is based on the example presented in the Enterprise Integration Patterns book. This chapter of the book is available online so you can see a detailed description of the application here.
Mule Examples Webapp A web application that provides an interface to some of the examples, including LoanBroker, Hello World, and Echo. It also provides examples of accessing Mule using REST-style service calls and is itself an example of how to embed Mule in a web application.
Bookstore Example Demonstrates how to build JAX-WS services with CXF and Mule.

If you are using Mule Enterprise Edition, you can also work with the JDBC transport examples to see how to send and receive messages from a database using the JDBC protocol.

<< Previous: Setting Up Eclipse Next: Tutorial >>
Adaptavist Theme Builder (3.3.2-conf2.10) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license