on 04-16-2015 2:15 PM
Hello everyone! We have to create a REST service that will accept HTTP GET calls and will retrieve PDF files to the REST client! How can I attach PDF files to the JSON response? Is that possible?
Thanks in advance
Julio
Hi Julio
Do you mean you need to provide both a JSON response together with a PDF file?
From the online help details, it looks like attachments are not supported by the REST adapter.
REST Adapter Overview - Advanced Adapter Engine - SAP Library
Maybe you can change the design and have two services instead - after all RESTful services are supposed to be simple
1) provide JSON response
2) provide PDF file
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Julio
I don't have the SAP REST adapter on my system, so I can't test it out, but can you try to specify the Response Format as XML in the sender channel to see if it adds the { to the response?
Not sure how you are retrieving the PDF file on your receiver side, but if it's an attachment from the receiver channel, then you can try to swap it into the main payload either with a Java mapping or PayloadSwapBean.
Rgds
Eng Swee
Hi Julio,
Do you found the solution? I have a requirement, HTTP GET calls and will retrieve PDF files from the client.
Please help.
Regards,Sirius.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.