cancel
Showing results for 
Search instead for 
Did you mean: 

Content MD5 and SHA256 Parameters in Rest URL

Former Member
0 Kudos

Hi,

I am facing the following challenge while configuring Receiver REST Adapter. The API I am trying to call requires a content MD5-checksum and SHA256 Signature key in the query parameter.

Please find a sample query:

I need to generate the ContentMD5Value and SHA256 Signature dynamically and pass the same in the Request query as parameters. I am stuck here. Any inputs/ help will be great.

Thanks & Regards,

Sukumar

Accepted Solutions (1)

Accepted Solutions (1)

Muniyappan
Active Contributor

Did you try these? you can generate ContentMD5Value and SHA256 Signature in udf and store it in dynamic config key. later use it in the channel by refering the key name

https://blogs.sap.com/2015/04/14/pi-rest-adapter-define-custom-http-header-elements/

https://answers.sap.com/questions/84202/how-configure-dynamic-http-header-in-rest-receiver.html

Former Member
0 Kudos

Hello Muni,

Thanks for your reply.

you can generate ContentMD5Value in udf

>>>I need to generate the Content MD5Value from my target XML structure which will be passed as the HTTP body.

Can you please guide me how is it possible by using a UDF?

Thanks and Regards,

Sukumar

Muniyappan
Active Contributor
0 Kudos

can you please check with API team who have provided this service? They can help you on how to generate the code.

Former Member
0 Kudos

Hello Muni,

I was able to successfully able to generate the dynamic encrypted values using UDF and pass the same using Dynamic Configuration.

The url getting generated is correct and working fine in postman. But it is failing in Rest reciever channel for POST operation.

I am getting HTTP Options: 400 Bad Request error in the rest receiver channel. I searched on SDN and found out about HTTP header and Content Type, but in my case I am just hitting the generated URL in postman without and body and getting the response. But in PI Rest receiver channel it's giving 400 bad request.

Can you please provide inputs if any.

Thanks and Regards,

Sukumar

Muniyappan
Active Contributor
0 Kudos

could you please share your postman test screen shots and channel config?

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Gurus,

Need your help to resolve 400 Bad request error in Rest Receiver Channel configuration.

This is the rest request i need to send.

For this, I am using the below url in postman and Rest Reciever channel in PI.

The above url is working fine in postman and failing in REST receiver channel in SAP PI.

Thanks and Regards,

Sukumar