Access Keys:
Skip to content (Access Key - 0)
Unknown macro: {mulecore_mulenav}

Introduction

The easiest way to start using mule is to walk through an example. The following chapters provide a step-by-step guide to setting up and running the example applications that ship with Mule.

Build Scripts

Starting with the 1.3-rc5 release, Mule samples are found in the examples directory under the distribution. Mule ships with two kinds of samples: samples that run out of the box, and samples the depend on downloading of third-party jars. For this reason, the examples directory is subdivided into ant and maven directories. Each of these directories contains the same samples - the only practical difference is the build script in each sample directory. In the ant directory structure, all samples have a build.xml file. In the maven directory structure, all samples have a pom.xml file.

Currently, the only examples that require third-party jars are the Loan Broker and Error Hander examples. If you wish to use Ant (version 1.6.5 or greater) to prepare these samples, use the examples/ant directory. If you prefer to use Maven instead, use the examples/maven

If you are using Mule Enterprise Edition, set up your Maven repository as follows before running the Maven examples:

  1. Open a command prompt and navigate to the Mule bin directory.
  2. Type populate_m2_repo.cmd followed by the location of the Maven repository directory (the same directory you specified in the settings.xml file when you installed Maven).

For example:

cd c:\mule\bin
populate_m2_repo.cmd c:\.m2\repository

Samples

Listed below are the samples that ship with the full Mule distribution. Click on the links below to see the detailed instructions for each.


Echo Example
Is a simple component example that demonstrates how to expose a component over multiple transports.


Hello World Example
Shows how to configure multiple 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 and transform the result using XSLT and deserialise the result to a StockQuote javabean. The examples demonstrates invoking the service using REST and SOAP.


Error Handler Example
Demonstrates using Spring as the external container to provide the objects managed by Mule and how to publish events to multiple outbound endpoints. The sample consists of two components; ExecptionManager and BusinessErrorManager.


Spring Events Example
Demostrates how to send and receive Mule events using the Spring ApplicationContext without needing to write any Mule specific code or configuration!


Bookstore Example
Demonstrates how to use CXF with Mule.


Scripting Example
Demonstrates Mule's JSR-223 Scripting support.


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.


Voip Service Example
The Voip Service example is taken from a Java.net featured article, Provisioning Services Through ESB, which describes how to orchestrate services through abstraction, providing a VOIP provisioning example developed using Mule.

Mail, Servlet and Jms Example
This page contains a simple example that explains how to integrate Servlets, JMS (ActiveMQ) and JavaMail using a simple programming example.


Mule Examples Webapp
Is a webapp that provides an interface to some of the examples here such as the LoanBroker, Hello World and Echo examples. It also provides examples of accessing Mule using REST style service calls and is itself an example of how to embed Mule in a webapp.

Adaptavist Theme Builder (3.3.2-conf2.10) Powered by Atlassian Confluence 2.10, the Enterprise Wiki.
Free theme builder license