on 2020 Jun 08 7:25 PM
Hi everyone,
I have an issue and I really cannot solve it.
I have to call a Customer Checkuout API from SAP PO, using REST Receiver.
The idea is I have to get a token and then call the API that I want to use.
Testing in Postman everything works fine as you can see in the next picture.
1- I'm getting the token
2- I use the same Session ID calling the correct API and it works perfect.
The issues come in PO.
I've tried to create an UDF doing a "REST LOOKUP" pretty similar like here https://blogs.sap.com/2017/01/23/oauth-2.0-authentication-within-a-udf-mapping-to-be-included-in-res... without luck.
With this option I'm getting the error:
Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP POST call to http://XXXXX:8080/ccos/api/internal/sync/materials/bulk not successful.Now I'm trying to do it using OAuth but without luck again.
With this option I'm getting this error.
Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.adapter.rest.ejb.common.exception.HttpCallException: HTTP OAUTH 2.0 RESOURCE OWNER PASSWORD CREDENTIALS GRANT call to http://XXXXX:8080/ccos/api/auth/admin not successful. Error while processing Authorization request!I have tried many thing but without success, please I really need a help.
Thank you in advance.
Request clarification before answering.
Hi mojammil_khan, are you having the same issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I could solve it.
In the first call the REST give me the Session ID and Token, so I have to send token and Cookie parameter in the header using the sessionId of the first call.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sebastianalvarez79, I'm having the exact same scenario. The only difference is that I'm having two "set-cookie" keys in the header of the response (having the same name of the key but different values).. Now when I'm trying to get it using dynamic configuration UDF, I'm able to get only 1 value. My requirement is to get both of them but the value is getting overwritten and i'm able to get only the second value... Any suggestions on how can we fetch both the values having the same key name in the response header?
User | Count |
---|---|
67 | |
12 | |
12 | |
7 | |
7 | |
4 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.