Skip to Content
0

REST Adapter reposnse format conversion

Oct 21, 2016 at 02:52 PM

50

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
avatar image
Former Member Oct 22, 2016 at 03:14 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Abhishek Gupta Oct 24, 2016 at 02:31 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

1
Abhishek Gupta Nov 01, 2016 at 02:55 PM
0

Hi Praveen,

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

Abhishek

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

Done mate.

0