SlideShare a Scribd company logo
1 of 6
Using File to string and
logger component
Open Anypoint Studio
Create a File  New  Mule Project
Click «Finish»
Expand the «myfirstproject» on package explorer
Double click on myfirstproject.xml
Once file is open, show Message Flow
From Mule Palette view, search for ‘File’ ,‘File To String’ ,‘Logger’ and select the first one.
Drag and Drop HTTP then Java component into Message Flow view.
Now we have to configure the File component for our HTTP flow.
Double click on it and set a path in a local folder then create a txt file outside the folder.
Click OK and SAVE
Configure the Logger component to print out the flow message about the file we are transferring (show on Console).
File-To-String element configures a transformer that reads the content of java.io.File into a java.lang.String.
Actually we don’t have to give it a custom configuration.
Click on SAVE at top-left of screen
Now we can start our Mule server
Right Click on project Run As 
Mule Application
On the Console view below server
is going to start.
At the end you will see the status
DEPLOYED.
This means that server is up and
running
Now we can see the result:
drop the txt file we created into
the folder and look at the console
message.
The flow works!

More Related Content

What's hot

Python session.11 By Shanmugam
Python session.11 By ShanmugamPython session.11 By Shanmugam
Python session.11 By Shanmugam
Navaneethan Naveen
 

What's hot (15)

Mule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converterMule esb How to use Jackson in Object to Json converter
Mule esb How to use Jackson in Object to Json converter
 
Setting filedynamically
Setting filedynamicallySetting filedynamically
Setting filedynamically
 
Managing system remotely
Managing system remotely Managing system remotely
Managing system remotely
 
Mule esb db_1
Mule esb db_1Mule esb db_1
Mule esb db_1
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
 
Mule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converterMule esb How to use Jackson in Json to Object converter
Mule esb How to use Jackson in Json to Object converter
 
Mule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutesMule esb How to convert from Object to Json in 5 minutes
Mule esb How to convert from Object to Json in 5 minutes
 
Ejercicios vb primer parcial
Ejercicios vb primer parcialEjercicios vb primer parcial
Ejercicios vb primer parcial
 
Mule esb - How to convert from Json to Object in 5 minutes
Mule esb - How to convert from Json to Object in 5 minutesMule esb - How to convert from Json to Object in 5 minutes
Mule esb - How to convert from Json to Object in 5 minutes
 
Mule io flow
Mule io flowMule io flow
Mule io flow
 
Example esb flow
Example esb flowExample esb flow
Example esb flow
 
Python session.11 By Shanmugam
Python session.11 By ShanmugamPython session.11 By Shanmugam
Python session.11 By Shanmugam
 
My mule esb flow
My mule esb flowMy mule esb flow
My mule esb flow
 
Creating Queue Manager and Queue's in IBM WebSphere Mq
Creating Queue Manager and Queue's in IBM WebSphere MqCreating Queue Manager and Queue's in IBM WebSphere Mq
Creating Queue Manager and Queue's in IBM WebSphere Mq
 
Parameters as a part of body
Parameters as a part of bodyParameters as a part of body
Parameters as a part of body
 

Viewers also liked

Viewers also liked (18)

Mule esb httpflow
Mule esb   httpflowMule esb   httpflow
Mule esb httpflow
 
Mule
MuleMule
Mule
 
Mule Scatter-Gather component
Mule Scatter-Gather componentMule Scatter-Gather component
Mule Scatter-Gather component
 
Creating custom aggregation strategy
Creating custom aggregation strategyCreating custom aggregation strategy
Creating custom aggregation strategy
 
Mule esb lesson 1
Mule esb   lesson 1Mule esb   lesson 1
Mule esb lesson 1
 
Using scatter gather
Using scatter gatherUsing scatter gather
Using scatter gather
 
Scatter gather
Scatter gather Scatter gather
Scatter gather
 
MuleSoft ESB scatter-gather and base64
MuleSoft ESB scatter-gather and base64MuleSoft ESB scatter-gather and base64
MuleSoft ESB scatter-gather and base64
 
Scatter-Gather
Scatter-GatherScatter-Gather
Scatter-Gather
 
How to create an api in mule
How to create an api in muleHow to create an api in mule
How to create an api in mule
 
mule custom aggregator
mule   custom aggregatormule   custom aggregator
mule custom aggregator
 
Scatter gather component - mule
Scatter gather component - muleScatter gather component - mule
Scatter gather component - mule
 
Mule soft basic example
Mule soft basic exampleMule soft basic example
Mule soft basic example
 
Multi database access
Multi database accessMulti database access
Multi database access
 
The routing message processor scatter gather
The routing message processor scatter gatherThe routing message processor scatter gather
The routing message processor scatter gather
 
Mulesoft intergrate for android app
Mulesoft intergrate for android appMulesoft intergrate for android app
Mulesoft intergrate for android app
 
Scatter gather flow in mule
Scatter gather flow in muleScatter gather flow in mule
Scatter gather flow in mule
 
Enterprise Integration Pattern - Mule Soft Scatter gather
Enterprise Integration Pattern - Mule Soft Scatter gatherEnterprise Integration Pattern - Mule Soft Scatter gather
Enterprise Integration Pattern - Mule Soft Scatter gather
 

Similar to Input and output flow using file to string and logger component

Utilize Flex And Java Servlet To Implement File Upload
Utilize Flex And Java Servlet To Implement File UploadUtilize Flex And Java Servlet To Implement File Upload
Utilize Flex And Java Servlet To Implement File Upload
Guo Albert
 

Similar to Input and output flow using file to string and logger component (20)

Mule esb using file to string and logger component
Mule esb using file to string and logger componentMule esb using file to string and logger component
Mule esb using file to string and logger component
 
Input and output flow using file and logger component
Input and output flow using file and logger component Input and output flow using file and logger component
Input and output flow using file and logger component
 
Mule esb file to-string flow
Mule esb file to-string flowMule esb file to-string flow
Mule esb file to-string flow
 
Simple interact between http and java components
Simple interact between http and java componentsSimple interact between http and java components
Simple interact between http and java components
 
File tostring conversion
File tostring conversionFile tostring conversion
File tostring conversion
 
Example esb flow
Example esb flowExample esb flow
Example esb flow
 
Payload and logger
Payload and loggerPayload and logger
Payload and logger
 
Utilize Flex And Java Servlet To Implement File Upload
Utilize Flex And Java Servlet To Implement File UploadUtilize Flex And Java Servlet To Implement File Upload
Utilize Flex And Java Servlet To Implement File Upload
 
My mule esb first http flow
My mule esb first http flowMy mule esb first http flow
My mule esb first http flow
 
Esb first http flow
Esb first http flowEsb first http flow
Esb first http flow
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp  in mule esbSend email attachment using smtp  in mule esb
Send email attachment using smtp in mule esb
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 
Symple io flow
Symple io flowSymple io flow
Symple io flow
 
Email using mule
Email using muleEmail using mule
Email using mule
 
Java Servlets Part 2
Java Servlets Part 2Java Servlets Part 2
Java Servlets Part 2
 

More from Son Nguyen

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Input and output flow using file to string and logger component

  • 1. Using File to string and logger component
  • 2. Open Anypoint Studio Create a File  New  Mule Project Click «Finish»
  • 3. Expand the «myfirstproject» on package explorer Double click on myfirstproject.xml Once file is open, show Message Flow From Mule Palette view, search for ‘File’ ,‘File To String’ ,‘Logger’ and select the first one. Drag and Drop HTTP then Java component into Message Flow view.
  • 4. Now we have to configure the File component for our HTTP flow. Double click on it and set a path in a local folder then create a txt file outside the folder. Click OK and SAVE
  • 5. Configure the Logger component to print out the flow message about the file we are transferring (show on Console). File-To-String element configures a transformer that reads the content of java.io.File into a java.lang.String. Actually we don’t have to give it a custom configuration. Click on SAVE at top-left of screen
  • 6. Now we can start our Mule server Right Click on project Run As  Mule Application On the Console view below server is going to start. At the end you will see the status DEPLOYED. This means that server is up and running Now we can see the result: drop the txt file we created into the folder and look at the console message. The flow works!