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>

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

  • 1.
    Mule ESB How toconvert 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>