MULE Example
Example
Let's make the classic Hello World. We will
create a new project from Eclipse by
selecting New Project -> Mule.
Example
create a folder called conf in the project
●
Example
We use the Eclipse plugin Mule to generate the
mule-config.xml file containing all settings Mule
●
● To do this we click with the right button on the
conf folder -> New -> Other -> Mule -> Mule
Configuration and a screen appears where we
choose Groovy and this generates our mule-
config.xml.
Example
In the mule-config.xml file we have declared
a service that listens for requests at http: //
localhost: 8080 / helloworld. This request
will be redirected to a component that can
be a simple POJO or any kind of business.
In this case it will be a Groovy dynamically
generated component that is responsible for
returning the text "Hello World".
Example
To prove launch the application from Eclipse
selecting the mule-config.xml and file right-
click Run As -> Mule Service. This will start
as a stand alone server Mule displaying our
example in the application container.
Example
To prove we open a browser and introduce
the URL http: // localhost: 8080 / helloworld,
the page will open contain the text "Hello
World" generated by the component Groovy
previously configured in response to our
request.

Example mule

  • 1.
  • 2.
    Example Let's make theclassic Hello World. We will create a new project from Eclipse by selecting New Project -> Mule.
  • 3.
    Example create a foldercalled conf in the project ●
  • 4.
    Example We use theEclipse plugin Mule to generate the mule-config.xml file containing all settings Mule ● ● To do this we click with the right button on the conf folder -> New -> Other -> Mule -> Mule Configuration and a screen appears where we choose Groovy and this generates our mule- config.xml.
  • 5.
    Example In the mule-config.xmlfile we have declared a service that listens for requests at http: // localhost: 8080 / helloworld. This request will be redirected to a component that can be a simple POJO or any kind of business. In this case it will be a Groovy dynamically generated component that is responsible for returning the text "Hello World".
  • 6.
    Example To prove launchthe application from Eclipse selecting the mule-config.xml and file right- click Run As -> Mule Service. This will start as a stand alone server Mule displaying our example in the application container.
  • 7.
    Example To prove weopen a browser and introduce the URL http: // localhost: 8080 / helloworld, the page will open contain the text "Hello World" generated by the component Groovy previously configured in response to our request.