header

For BE/B.Tech/BCA/MCA/ME/M.Tech Major/Minor Project for CS/IT branch at minimum price Text Message @ 9424820157

First Mule Application

  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


No comments:

Post a Comment



Please go through below tutorials:


Mule 4 Tutorials

DEPLOY TO CLOUDHUB C4E CLIENT ID ENFORCEMENT CUSTOM POLICY RABBIT MQ INTEGRATION
XML TO JSON WEBSERVICE CONSUMER VM CONNECTOR VALIDATION UNTIL SUCCESSFUL
SUB FLOW SET & REMOVE VARIABLE TRANSACTION ID SCATTER GATHER ROUND ROBIN
CONSUME REST WEBSERVICE CRUD OPERATIONS PARSE TEMPLATE OBJECT TO JSON LOAD STATIC RESOURCE
JSON TO XML INVOKE IDEMPOTENT FILTER FOR EACH FLAT TO JSON
FIXWIDTH TO JSON FIRST SUCCESSFUL FILE OPERATIONS EXECUTE ERROR HANDLING
EMAIL FUNCTIONALITY DYNAMIC EVALUATE CUSTOM BUSINESS EVENT CSV TO JSON COPYBOOK TO JSON
CHOICE ASYNC

Widely used Connectors in Mule 3

CMIS JETTY VM CONNECTOR SALESFORCE POP3
JMS TCP/IP WEBSERVICE CONSUMER QUARTZ MONGO DB
FILE CONNECTOR DATABASE CONNECTOR


Widely used Scopes in Mule 3

SUB FLOW REQUEST REPLY PROCESSOR CHAIN FOR EACH CACHE
ASYNC TCP/IP COMPOSITE SOURCE POLL UNTIL SUCCESSFUL
TRANSACTIONAL FLOW

Widely used Components in Mule 3

EXPRESSION CXF SCRIPT RUBY PYTHON
JAVASCRIPT JAVA INVOKE CUSTOM BUSINESS EVENT GROOVY
ECHO LOGGER


Widely used Transformers in Mule 3

MONGO DB XSLT TRANSFORMER REFERENCE SCRIPT RUBY
PYTHON MESSAGE PROPERTIES JAVA TRANSFORMER GZIP COMPRESS/UNCOMPRESS GROOVY
EXPRESSION DOM TO XML STRING VALIDATION COMBINE COLLECTIONS BYTE ARRAY TO STRING
ATTACHMENT TRANSFORMER FILE TO STRING XML TO DOM APPEND STRING JAVASCRIPT
JSON TO JAVA COPYBOOK TO JSON MAP TO JSON JSON TO XML FLATFILE TO JSON
FIXWIDTH TO JSON CSV TO JSON


Widely used Filters in Mule 3

WILDCARD SCHEMA VALIDATION REGEX PAYLOAD OR
NOT MESSAGE PROPERTY MESSAGE IDEMPOTENT FILTER REFERNCE
EXPRESSION EXCEPTION CUSTOM AND


Exception Strategy in Mule 3

REFERENCE EXCEPTION STRATEGY CUSTOM EXCEPTION STRATEGY CHOICE EXCEPTION STRATEGY CATCH EXCEPTION STRATEGY GLOBAL EXCEPTION STRATEGY


Flow Control in Mule 3

CHOICE COLLECTION AGGREGATOR COLLECTION SPLITTER CUSTOM AGGREGATOR FIRST SUCCESSFUL
MESSAGE CHUNK AGGREGATOR MESSAGE CHUNK SPLITTER RESEQUENCER ROUND ROBIN SOAP ROUTER