on 2021 Dec 23 10:30 AM
Dear Experts,
I am working on a scenario where its a 2 step process for getting documents from a rest API:
1. Log on to https://<host>/api/login>; in order to get the token.
2. Attach the token in the token field of the payload and send the data to https://<host>/api/getdocument to get the response and document. No authentication needed in header. Working fine from POSTMAN.
I have built a Proxy to Rest synchronous scenario. In mapping I have created a REST lookup where I am performing the point number 1 above, getting the token and extracting it from the response and mapping it to the <token> payload field.
I have created a REST receiver channel with GET method, given the endpoint mentioned in point number 2 above and trying to send the payload (along with token) to the target, but I am getting 401, unauthorized. Also, in monitoring I am not able to see the JSON payload which we usually see if we have ticked log JSON message in Data Format (receiver rest adapter) .
I have taken the token that I am getting in SAP PO and checked via postman, there I am getting 200 ok response code with the same JSON payload (equivalent to SAP PO XML payload). Below is the settings in Receiver rest adapter. Should be pretty much simple as except for Content-Type nothing else goes in header. Token goes in the JSON body.
Any pointers here would be helpful.
Request clarification before answering.
User | Count |
---|---|
52 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.