cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Header paramets in SAP PI 7.3

bhargava_dns
Participant
0 Kudos
374

I have a requirement to connect third party webservice using REST for which the access token need to be passed in the header parameter.

when the access token is passed in the static forms I was able to establish the communications , but when the token is passed dynamically I am unable to establish communication , I am getting unauthorized error.

The following is the java code that I have used for dynamic mapping.

DynamicConfiguration conf = transformationInput.getDynamicConfiguration();
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/REST","pspRefNo");

conf.put(key, pspreq);

byte[] byteArrray = encryptedString.getBytes();
outputstream.write(byteArrray);

View Entire Topic
stefan_grube
Active Contributor

Parameters in REST adapter need to be enclosed in brackets {}

Between "Bearer" and the parameter should be a space:
Bearer {token}

bhargava_dns
Participant
0 Kudos

Hi Stefan

I have changed the parameters according to the suggestion but still facing the same issue