SlideShare a Scribd company logo
Mule ESB
How to convert from Json to Xml in 5 minutes
Gennaro Spagnoli - 2016
Gennaro Spagnoli - 2016
In this tutorial we will be creating an easy json to xml converter using mule esb.
Let’s begin creating a simple flow with an http listener, in order to get some json sdata from
some external source:
Gennaro Spagnoli - 2016
Now we can put our Xml to Json transformer in order to get the transformation:
For now, no further configuration is required for the component.
Let’s add the usual Logger component to show the transformation done on the console:
Gennaro Spagnoli - 2016
It’s time to start the server and get ready to test the application by calling the flow.
To do this, we will use postman as the http client, to create the request and get the response.
Configure it like this:
Gennaro Spagnoli - 2016
Let’s now press «send» and see the result:
Fantastic!
As a last check let’s go on the console and see what it has produced:
[[db_test].HTTP_Listener_Configuration.worker.0
1]
org.mule.api.processor.LoggerMessageProcessor:
<?xml
version='1.0'?><root><user><nome>Gennaro</nome>
<cognome>Spagnoli</cognome></user><user><nome>G
onzalo</nome><cognome>Higuain</cognome></user><
/root>

More Related Content

What's hot

Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
Anirban Sen Chowdhary
 
Spicing your mule response
Spicing your mule responseSpicing your mule response
Spicing your mule response
Anirban Sen Chowdhary
 
Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
Anirban Sen Chowdhary
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
Anirban Sen Chowdhary
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Mule
irfan1008
 
Mule esb soap_service
Mule esb soap_serviceMule esb soap_service
Mule esb soap_service
Gennaro Spagnoli
 
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutesMule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Gennaro Spagnoli
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
F K
 
Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in mule
Anirban Sen Chowdhary
 
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
Son Nguyen
 
Groovy example in mule
Groovy example in muleGroovy example in mule
Groovy example in mule
Mohammed246
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standalone
Son Nguyen
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
Praneethchampion
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
Praneethchampion
 
Using ajax in mule
Using ajax in muleUsing ajax in mule
Using ajax in mule
Anirban Sen Chowdhary
 
Accessing Mule variables in groovy
Accessing Mule variables in groovyAccessing Mule variables in groovy
Accessing Mule variables in groovy
Anirban Sen Chowdhary
 

What's hot (16)

Accessing jms in mule using groovy
Accessing jms in mule using groovyAccessing jms in mule using groovy
Accessing jms in mule using groovy
 
Spicing your mule response
Spicing your mule responseSpicing your mule response
Spicing your mule response
 
Mule message enricher
Mule message enricherMule message enricher
Mule message enricher
 
Running mule from java
Running mule from javaRunning mule from java
Running mule from java
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Mule
 
Mule esb soap_service
Mule esb soap_serviceMule esb soap_service
Mule esb soap_service
 
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutesMule esb - How to make CRUD operations to a MySql Database in 5 minutes
Mule esb - How to make CRUD operations to a MySql Database in 5 minutes
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Scheduling and monitoring with java in mule
Scheduling and monitoring with java in muleScheduling and monitoring with java in mule
Scheduling and monitoring with java in 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
 
Groovy example in mule
Groovy example in muleGroovy example in mule
Groovy example in mule
 
Running mule standalone
Running mule standaloneRunning mule standalone
Running mule standalone
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 
Mule quartz
Mule quartz Mule quartz
Mule quartz
 
Using ajax in mule
Using ajax in muleUsing ajax in mule
Using ajax in mule
 
Accessing Mule variables in groovy
Accessing Mule variables in groovyAccessing Mule variables in groovy
Accessing Mule variables in groovy
 

Similar to Mule esb How to convert from Json to Xml in 5 minutes

Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
Gennaro Spagnoli
 
Json
JsonJson
Json
manavp
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
Anirban Sen Chowdhary
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
Gennaro Spagnoli
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
Anirban Sen Chowdhary
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
Anirban Sen Chowdhary
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
mdfkhan625
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
javeed_mhd
 
Creating dynamic json in Mule
Creating dynamic json in MuleCreating dynamic json in Mule
Creating dynamic json in Mule
F K
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
Mohammed625
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
Hasan Syed
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
Mohammed246
 
Creating dynamic json in mule
Creating dynamic json in muleCreating dynamic json in mule
Creating dynamic json in mule
Praneethchampion
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
Khasim Saheb
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
AbdulImrankhan7
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
Sunil Komarapu
 
Create dynamic json using mule
Create dynamic json using muleCreate dynamic json using mule
Create dynamic json using mule
Son Nguyen
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
Anirban Sen Chowdhary
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
AbdulImrankhan7
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
javeed_mhd
 

Similar to Mule esb How to convert from Json to Xml in 5 minutes (20)

Mule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutesMule esb How to convert from CSV to Json in 5 minutes
Mule esb How to convert from CSV to Json in 5 minutes
 
Json
JsonJson
Json
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Mule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutesMule esb - How to connect to a MySql Database in 5 minutes
Mule esb - How to connect to a MySql Database in 5 minutes
 
Mule with composite source
Mule with composite sourceMule with composite source
Mule with composite source
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
 
Creating dynamic json in Mule
Creating dynamic json in MuleCreating dynamic json in Mule
Creating dynamic json in Mule
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Creating dynamic json in mule
Creating dynamic json in muleCreating dynamic json in mule
Creating dynamic json in mule
 
Creating dynamic json
Creating dynamic json Creating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Creating dynamic json
Creating dynamic jsonCreating dynamic json
Creating dynamic json
 
Create dynamic json using mule
Create dynamic json using muleCreate dynamic json using mule
Create dynamic json using mule
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 

Recently uploaded

办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
rtunex8r
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
k4ncd0z
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
Tarandeep Singh
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
3a0sd7z3
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
3a0sd7z3
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
Donato Onofri
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
ysasp1
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
Paul Walk
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
uehowe
 

Recently uploaded (16)

办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
怎么办理(umiami毕业证书)美国迈阿密大学毕业证文凭证书实拍图原版一模一样
 
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理一比一原版(USYD毕业证)悉尼大学毕业证如何办理
一比一原版(USYD毕业证)悉尼大学毕业证如何办理
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
Bengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal BrandingBengaluru Dreamin' 24 - Personal Branding
Bengaluru Dreamin' 24 - Personal Branding
 
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
快速办理(Vic毕业证书)惠灵顿维多利亚大学毕业证完成信一模一样
 
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
快速办理(新加坡SMU毕业证书)新加坡管理大学毕业证文凭证书一模一样
 
HijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process HollowingHijackLoader Evolution: Interactive Process Hollowing
HijackLoader Evolution: Interactive Process Hollowing
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
成绩单ps(UST毕业证)圣托马斯大学毕业证成绩单快速办理
 
Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?Should Repositories Participate in the Fediverse?
Should Repositories Participate in the Fediverse?
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
留学挂科(UofM毕业证)明尼苏达大学毕业证成绩单复刻办理
 

Mule esb How to convert from Json to Xml in 5 minutes

  • 1. Mule ESB How to convert from Json to Xml in 5 minutes Gennaro Spagnoli - 2016
  • 2. Gennaro Spagnoli - 2016 In this tutorial we will be creating an easy json to xml converter using mule esb. Let’s begin creating a simple flow with an http listener, in order to get some json sdata from some external source:
  • 3. Gennaro Spagnoli - 2016 Now we can put our Xml to Json transformer in order to get the transformation: For now, no further configuration is required for the component. Let’s add the usual Logger component to show the transformation done on the console:
  • 4. Gennaro Spagnoli - 2016 It’s time to start the server and get ready to test the application by calling the flow. To do this, we will use postman as the http client, to create the request and get the response. Configure it like this:
  • 5. Gennaro Spagnoli - 2016 Let’s now press «send» and see the result: Fantastic! As a last check let’s go on the console and see what it has produced: [[db_test].HTTP_Listener_Configuration.worker.0 1] org.mule.api.processor.LoggerMessageProcessor: <?xml version='1.0'?><root><user><nome>Gennaro</nome> <cognome>Spagnoli</cognome></user><user><nome>G onzalo</nome><cognome>Higuain</cognome></user>< /root>