Skip to Content

Unable to parse XML message payload to extract operation for receiver - Rest Adapter

Hi All,

I am working on a scenario Rest Async - > PI -> File where I am getting data in JSON format . I have configured my sender channel as Async Rest also configured Operation Determination but I am getting below error

Unable to parse XML message payload to extract operation for receiver determinationorg.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.


Reference -

https://archive.sap.com/discussions/thread/3693248

https://archive.sap.com/discussions/thread/3924907

https://blogs.sap.com/2015/10/26/exposing-rest-service-with-multiple-operations-in-sap-po-with-rest-adapter/

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 02, 2017 at 06:27 AM

    Hi Rudra,

    You can try the below message type structure which will also allow you to have multiple records. Probably the inbuilt JSON to XML converter of REST Adapter expects the message structure to be in a certain format as below. This one works well for me :)

    And then the channel configuration can be as below-

    Lastly, you can do a POST from either Postman or SOAPUI using the below end point -

    http:<myHost>:<myPort>/RESTAdapter/FltTest

    and the payload as (multiple occurrences for Record node)-

    {

    "Record": [{ "AirlineID": "A123", "ConnID": "A123", "Date": "20111988" } ,

    { "AirlineID": "A234", "ConnID": "A234", "Date": "20112017" } ]}

    Let me know if it works for you :)

    Regards,

    Karthik Bangera

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 31, 2017 at 02:22 PM

    Check your JSON data format. Dat might have some JSON formatting issue, hence REST sender channel is failing to convert this to XML or there might have some characters in JSON data parameter which is not allowed in XML tag.

    Thanks,

    Apu

    Add comment
    10|10000 characters needed characters exceeded