Skip to Content
0

Content MD5 and SHA256 Parameters in Rest URL

Nov 08, 2017 at 07:13 AM

86

avatar image
Former Member

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

capture.png (18.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Muniyappan Marasamy Nov 08, 2017 at 10:24 AM
1

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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

0
Former Member

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

0

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

0
avatar image
Former Member Nov 14, 2017 at 07:11 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded