First Mule Application
Mule Applications
You typically create Mule apps to perform system integrations. Mule apps are configured to run in Mule Runtime. A request to a Mule app triggers Mule to encode the request and data in a Mule Event, and to pass it to either single or multiple threads.
The main building blocks of Mule apps are components. Components execute business logic on the messages that flow through your apps. There are three categories of component: core components, components that are grouped into collections named connectors, and components that are grouped into collections named modules.
Core Components
These are individual components that are part of the core of the functionality of Mule Runtime. Here is a sampling of the features that core components let you add to your apps:
Asynchronous processing of parts of a flow or subflow
Batch processing of messages
Initiating subflows
Logging
Setting payloads
Transforming messages with the DataWeave language
Creating Try scopes in your flows so that you can catch and respond to errors
Now we are making our first mule application in Anypoint studio 6 having mule version 3.
Tools used for building and testing mule application :
1. Anypoint Studio 6.2.1
2. Postman
This is very basic application which print Hello Himanshu in output
1) open anypoint studio
2) go to File - New - Mule Project
3) Give project name as shown below

4) Click on Next - Next - Finish
5) It will create a mule project which you can see in package explorer shown below

6) Now click on testbasicapplication.xml and type http in mule palette it will show http connector.Drag and drop http connector to canvas as shown below

7) Now, click on Http connector and click green plus + button of connector configuration.

8) Now put desired port number as i have given 8085, rest keep as it is and click OK.
9) Give path name in path section shown below, i have given /basic.

10) Press ctrl+s to save it.
11) Now write set payload in mule palette and drag and drop after http connector as shown below

12) Now write Hello Himanshu in set payload section and press ctrl + s to save it.

13) Now run the application by right clicking on canvas and then click on Run project testbasicapplication

14) Now server will start and project starts deploying.it takes few seconds to deploy on server.
15) We can see on console once its get deployed.

16) Now open postman select method as GET and click the desired url : http://localhost:8085/basic
17) it will give output as : Hello Himanshu
You typically create Mule apps to perform system integrations. Mule apps are configured to run in Mule Runtime. A request to a Mule app triggers Mule to encode the request and data in a Mule Event, and to pass it to either single or multiple threads.
The main building blocks of Mule apps are components. Components execute business logic on the messages that flow through your apps. There are three categories of component: core components, components that are grouped into collections named connectors, and components that are grouped into collections named modules.
Core Components
These are individual components that are part of the core of the functionality of Mule Runtime. Here is a sampling of the features that core components let you add to your apps:
Asynchronous processing of parts of a flow or subflow
Batch processing of messages
Initiating subflows
Logging
Setting payloads
Transforming messages with the DataWeave language
Creating Try scopes in your flows so that you can catch and respond to errors
Now we are making our first mule application in Anypoint studio 6 having mule version 3.
Tools used for building and testing mule application :
1. Anypoint Studio 6.2.1
2. Postman
This is very basic application which print Hello Himanshu in output
1) open anypoint studio
2) go to File - New - Mule Project
3) Give project name as shown below
4) Click on Next - Next - Finish
5) It will create a mule project which you can see in package explorer shown below
6) Now click on testbasicapplication.xml and type http in mule palette it will show http connector.Drag and drop http connector to canvas as shown below
7) Now, click on Http connector and click green plus + button of connector configuration.
8) Now put desired port number as i have given 8085, rest keep as it is and click OK.
9) Give path name in path section shown below, i have given /basic.
10) Press ctrl+s to save it.
11) Now write set payload in mule palette and drag and drop after http connector as shown below
12) Now write Hello Himanshu in set payload section and press ctrl + s to save it.
13) Now run the application by right clicking on canvas and then click on Run project testbasicapplication

14) Now server will start and project starts deploying.it takes few seconds to deploy on server.
15) We can see on console once its get deployed.
16) Now open postman select method as GET and click the desired url : http://localhost:8085/basic
17) it will give output as : Hello Himanshu
No comments:
Post a Comment