This application demonstrates a simple HTTP request-response flow. It responds to end user calls submitted via a Web browser with a message that reads "Hello World". This example was designed to demonstrate the ability of a Mule application to interact with an end user via an HTTP request. The goal in making it available is to introduce users to Anypoint Studio by illustrating very simple functionality.
This document describes the details of the example within the context of Anypoint™ Studio, Mule ESB’s graphical user interface (GUI). This document assumes that you are familiar with Mule ESB and the Anypoint Studio interface. To increase your familiarity with Mule Studio, consider completing one or more Anypoint Studio Tutorials.
Follow the steps in this procedure to create and run this example in your own instance of Anypoint Studio. You can create template applications straight out of the box in Anypoint Studio and tweak the configurations of the use case-based templates to create your own customized applications in Mule.
The Hello World example consists of one simple Mule flow. This flow accepts an HTTP request, sets a static payload on the message, then returns a response to the end user.
The request-response inbound HTTP endpoint receives requests the end user submits to the Web service. Because the message-exchange pattern is request-response, this HTTP endpoint is responsible for both receiving and returning messages. The descriptive notes included in the configuration of the endpoint can help you understand the actions the endpoint performs.
As its name suggests, the Set Payload component sets a value in the message payload. In this example, the value utilizes a Mule expression to set a static string on the payload. Like the HTTP endpoint, the configuration contains descriptive notes to help you understand what the component does.
Anypoint Studio includes a feature that enables you to easily export all the documentation you have recorded for your project. Whenever you want to share your project with others outside the Studio environment, you can export the project's documentation to print, email or share online. Studio's auto-generated documentation includes:
Follow this procedure to export auto-generated Studio documentation.