cancel
Showing results for 
Search instead for 
Did you mean: 

Proxy to Rest - Facing Problem while passing the data through Communication channel to REST API.

0 Kudos

Hi SAP Experts,

I am configuring SAP Proxy to Rest API Scenario through SAP PI.

In this configuration, I have a problem with passing Header & body parameters value to Rest API.

How should I configure Communication channel for Receiver Rest Adapter?

API URL à http://xxxx:3000/merchant/generate_token

API Parameters à

Request -- Header -> secret_key , Body -> merchant_id

Response-- access_token

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member399415
Discoverer
0 Kudos

Hi Kunal,

You can use the HTTP Headers section of REST channel to configure the HTTP header parameters, as per your screenshot.

Regarding the Body, check the raw payload and you could always write a simple java map to create the output in the format that raw data looks like in Postman.

Regards,

Sanjeev

0 Kudos

Hi Sanjeev

Thanks for reply.

I don't have 'HTTP Header' Tab as we are on the older service pack (SP - 9) therefore i have done some changes in API by adding both the parameters in HTTP Body as shown in below screen shot.

Can you please help me to write the java code for mapping the parameters i.e. to convert XML to JSON for request and JSON to XML for response.

Thanks & Regards,

Kunal

.