Skip to Content
author's profile photo Former Member
Former Member

How Configure Dynamic HTTP header in REST Receiver Channel

Hi All,

My scenario is PROXY to REST whereas Dynamic HTTP headers need to pass in Rest receiver channel, this header parameter.

We have write the udf for and passing the parameter values in the udf but , we confused how to configure the values in the REST refceiver channel .

UDF:

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName1"); DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName2"); DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName3"); DynamicConfigurationKey key4 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName4"); DynamicConfigurationKey key5 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName5"); conf.put(key1, var1); conf.put(key2,var2); conf.put(key3, var3); conf.put(key3, var4); conf.put(key3, var5); return "";

How To configure in the receiver REST channel ?

Pleas help us to achiv the same.

How to pass header name and Value Pattern in the receiver communication cahnnel.

Add comment
10|10000 characters needed characters exceeded

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 07, 2017 at 11:22 AM

    Hi Anju,

    First we need to do the cahnges in above UDF. Rename the SAOP with REST.

    Communication channel configuration's are like below.

    note : It will accecpt only the "_" values not "-"

    In Additional Http Header :

    Hope it will help you.

    Regards

    Ravi.S

    7893366122


    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      Thanks for this explanation, i was able to pass the Authorization Parameters via Dynamic Configuration.

      However, the value of the parameters are visible in the message audit log (RESTOUT_HTTP_HEADER).

      Is there anyway the Authorization Parameters can be passed in the HTTP Header as masked ?

      Regards,

      Krishna

  • Posted on Dec 14, 2016 at 11:02 PM

    Hi,

    Please check the below blog for dynamic configuration attribute in Rest adapter

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

    https://blogs.sap.com/2014/12/18/pi-rest-adapter-using-dynamic-attributes/

    regards,

    Harish

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 17, 2017 at 10:05 AM

    I have done my self to slove the above issue.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 03, 2017 at 11:03 AM

    Hi Ravinder, can you please explain how did you achieve this ?

    Add comment
    10|10000 characters needed characters exceeded