Skip to Content

REST Adapter reposnse format conversion

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

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

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 24, 2016 at 02:31 PM

    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

    Add comment
    10|10000 characters needed 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.

  • Nov 01, 2016 at 02:55 PM

    Hi Praveen,

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

    Abhishek

    Add comment
    10|10000 characters needed characters exceeded