Lets get started with our first lesson – the classic Hello World! At the end of this lesson, we would have learnt how to create projects, flows and run applications in Mule Studio. We will then learn how to deploy Mule Application into Mule ESB Standalone server.If not already done, please install Mule Studio and Mule ESB Standalone by following Installation article.In Mule Studio, create new project by clicking on File -> New -> Mule Project.
Enter project name and an optional project description as you desire.
Enter message flow name and file name. Message flow contains both graphical and XML views as we will see later.
This will create a project named “muletraining” and a flow named “hello.mflow”.
Click on “Configuration XML” tab to see Mule Flow in XML format. As you can see each mule flow has <mule> root element, imported libraries in the form of namespaces.
Lets create a HTTP endpoint now. Drag and drop “HTTP” end point from right side component palette.
It creates a default flow called helloFlow1 and adds HTTP endpoint inside. Also, it defaults hostname to localhost and port to 8081. Leave default values and explore other properties of HTTP endpoint.Drag “Set Payload” component from right side palette and drop it next to HTTP endpoint. As the name suggests, this component modifies payload in the flow.
Modify payload value to #[‘Hello World!] as shown below.
Click on “Configuration XML” tab to inspect generated XML. We can see that XML view has two new tags inside root <mule>.[gist id=”6899602″]Right click on hello.mflow and select Run As -> Mule Application
Make sure Mule project is successfully started.
Access http://localhost:8081/ from browser and verify “Hello World!” is displayed.