on 06-20-2015 5:00 PM
Hi experts, we have a special requirement in our project which the sender REST adapter has to send a PDF file in the response payload.
To achieve this, we've developed a java module to get the base64 string content from the payload and transform it into a byte[], and we've changed the payload data as follows:
payload.setContentType("application/pdf");
payload.setContent(bytes);
But when we call the service in the browser or any other client, we realized that the content-type in the response still "application/json".
Does anyone has tried to change the content-type for the adapter REST before? Is this kind of operation allowed in adapter REST?
Thank you for the help.
Rgds. Raphael
Hi Raphael,
Rest channel accept only application/xml and application/json
please read Ryan Crosby comment in link
Regards,
Maheswarareddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Experts,
I am working with REST synchronous scenario my rest response as shown below. I am able get one Item. I am note able get all items Can you please guide how can get Items. Thanks in advance for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raphael,
Have you tried MessageTransformBean and insert it after the call adapter rest step?
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In NWDS, in Sender CC, under Adapter-Specific tab, in General tab, kindly uncheck the checkbox "Convert XML Payload To JSON".
Regards,
Souvik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.