Skip to Content
avatar image
Former Member

Json2XML conversion error in REST receiver communication channel in PO7.5

Hi,

I have a problem with conversion on REST Receiver adapter, method GET. The communication channel is not converting the json payload to html. Getting error in PI.

The interface is sycronous: SAP S4Hana (Proxy) -> SAP PO (REST) -> External System (GET method).

Here is the json returned from external system.

{“Details”:{“OrderDetails”:[{“OrderID”:”0″,”OrderNo”:”00010″ }],”CustomerID”:”00001″,”UserID”:””,”Name”:””,”PCode”:””,”Status”:”Sucess”,”Message”:”Record Inserted Successfully”}}

Here is the error message from PO system.

MP: exception caught with cause com.sap.aii.adapter.rest.ejb.parse.InvalidJSonContent: Invalid JSON message content used; Message: “JSONArray text must end with ] at character 28 of

Bellow are the images.

Channel

Error Message

Please suggest me to resolve this error.

Regards

Surender

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 07, 2017 at 03:16 PM

    Hi Surender,

    Can you also share your response message type structure, looks like you are adding additional Details wrapper around the response.

    Regards,

    Sanjali

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sanjali,

      Thanks for the help. I have resolved the issue by removing add wrapper element option from my communication channel.

      Regards

      Surender

  • Dec 05, 2017 at 11:41 AM

    Can you confirm that the response you posted is the one returned by the external systems? It looks like it has a formating problem.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 07, 2017 at 01:02 PM

    Hi Bravo,

    Yes, posted is the one returned by the external systems?. I have already checked for format errors and tried to convert into xml file, did not find any format errors and successfully converted into xml file.

    Once again I'm uploading the payload.

    {"Details":{"OrderDetails":[{"OrderID":"0","OrderNo":"0001" }],"CustomerID":"0001","UserID":"","Name":"","PCode":"","Status":"Sucess","Message":"Record Inserted Successfully"}}

    Regards,

    Surender

    Add comment
    10|10000 characters needed characters exceeded