cancel
Showing results for 
Search instead for 
Did you mean: 

REST Adapter reposnse format conversion

itabhishek9
Participant
0 Kudos

Hi SDNites,

I am using Advantco adapter and making a Get call to receive the response. The response received is in Json format and I wanted it to be converted to XML and have it is not getting converted and I am getting below error.

Regards,

Abhi

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Abhishek,

Normally this error occurs when you have a more than one root node in the XML. I think response coming from rest service does not contain single root JSON element and JSON response contains multiple elements at root node level and XML structure only accept one root node not multiple root nodes that is why you getting above error.

Regards,

Praveen.

Answers (2)

Answers (2)

itabhishek9
Participant
0 Kudos

Hi Praveen,

Thanks for your inputs. I am able to resolve the issue based on your above comments.

Abhishek

former_member182412
Active Contributor
0 Kudos

You need mark the answer as correct answer then only it will be useful in future otherwise they don't know which one is the right answer, they can quickly find the correct answer for this qu

itabhishek9
Participant
0 Kudos

Done mate.

itabhishek9
Participant
0 Kudos

Hi Praveen,

You are absolutely correct in the above. JSON received from REST webservice has multiple elements at root node. Can you please let me know how can I convert it into XML in this case.

Regards,

Abhi

former_member182412
Active Contributor

Hi Abhishek,

Check in your adapter configuration can you able to add the root node if JSON does not contain, i don't have Advantco rest adapter, i am using SAP Rest adapter.

Regards,

Praveen.