Skip to Content

Rest Adapter - Getting response message as test/csv format

Hi PI / PO Gurus,

i know there is a thread with the same name. https://archive.sap.com/discussions/thread/3677886 But the thread is already obsolete and not resolved.

My scenario and requirement are almost same as the thread.

We are making a call to rest webservice from SAP PI and in response Rest webservice is sending response in the format of test/csv. WE need to scratch the response test/csv and put it in a file folder.

Request message : file --> SAP PI --> Rest WebService(Concur)

Response message : Rest Webservice -->SAP PI -->file without transformation.

We are using PO 7.50 SP13 Java single.

Request you to provide any inputs on handling this.

Many Thanks

Sara

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • Best Answer
    Posted on Mar 13, 2019 at 03:16 PM

    Hi Sara!

    Looking at provided screenshot it seems like you try to transform your source message from plain text to xml before sending to receiver. If you need to transform response message, I guess, that you need to put MessageTransformBean after RESTAdapterBean.

    Regards, Evgeniy.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 08, 2019 at 01:55 PM

    Supplement to the above thread:

    The REST-receiver can reach the endpoint and get the error: Unsupported Media Type.

    But the test with SoupUI works fine.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 10, 2019 at 08:35 AM

    Dear Manoj,

    thank you for your prompt reply!

    I changed the parameter of HTTP-Header as below:

    Now the error looks different:

    The return code points also to the unsupported media type.

    The response payload in the SoupUI is so:

    I should try MessageTransformBean Modules?

    Could you give me more hints?

    Thanks and regards

    Sara


    http-headers.png (18.0 kB)
    error-rest.png (14.6 kB)
    payload.png (24.5 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 11, 2019 at 04:14 PM

    Hi Experts,

    at weekend I tried with other possible configuration, i.e. the content-type under HTTP-Header is text/plain. Except this I added the MessageTransformBean in the REST-Reciver-Adapter. Now I get the TEXT file in the response, but it is not in the XML Format.

    Here is the parameters of MessageTransformBean:

    Now the error in the Postman is:

    I think it is because the payload is not in XML and the interface cannot be satisfied.

    The log means, the MessageTransformBean is executed before the message arriving End-Point, doesn't it?

    Could anyone tell me why the txt cannot be transformed into XML oder how to convert the payload in the response?

    I've now big headache with this problem.

    Highly appreciated if anyone could give me a hint!

    Regards

    Sara


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 06, 2020 at 05:34 PM

    Hi Sara,

    Are you able to solve this problem?Please share the solution.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.