cancel
Showing results for 
Search instead for 
Did you mean: 

JSON to XML Converter in HCI

apu_das2
Active Contributor

Hi,

I am getting JSON data from a REST service using request-Reply pattern in HCI. As REST adapter is not available in HCI like PI, hence I am fetching the JSON data using HTTP adapter get method.

Now, I am trying to convert this JSON data to XML using standard JSON to XML converter pattern available for iFlow design in Eclipse.

This is my incoming JSON format -

[
{
"ID": 3,
"code": "ffee0192",
"price": 300,
"departureDate": "2016-01-20T00:00:00",
"origin": "MUA",
"destination": "LAX",
"emptySeats": 0,
"plane": {
"type": "Boeing 777",
"totalSeats": 300
}
}
]

But, I am getting this error -

Cannot transform JSON document to XML: JSON document does not start with '{'.

JSON format is absolutely fine. Can anyone tell me how should I configure. I had added one groovy script as well to replace [ and ]. But, still no luck.

Any idea, whats going wrong. This is very easy to configure in PI.

Thanks,

Apu

View Entire Topic
0 Kudos

Thanks a lot Sriprasad. Solved the issue !!!