<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: How Configure Dynamic HTTP header in REST Receiver Channel in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394527#M40443</link>
    <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/38945/sravinder.html"&gt;S RAVINDER&lt;/A&gt;,&lt;/P&gt;
  &lt;P&gt;I am getting access_token from REST lookup and now I am trying to add dynamic attribute and assign it a value of the acquired access token....&lt;/P&gt;
  &lt;P&gt;Could you please help me here?&lt;/P&gt;
  &lt;P&gt;my UDF for dynamic config -&lt;/P&gt;
  &lt;P&gt; finally{ // 5. close the accessor in order to free resources. if (accessor!=null) accessor.close(); } //return token; //Dynamic Configuration DynamicConfiguration dynConf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/REST", "XHeaderName1"); dynConf.put(key, token); return "";&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;However, my UDF is giving error while testing -&lt;/P&gt;
  &lt;P&gt;Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 8] in class com.sap.xi.tf._MM_SFDC_RESTAPI_QUOTE_STATUS_UPSERT_REQ_V1_ method newAccessToken[com.sap.aii.mappingtool.tf7.rt.Context@30f2539]&lt;BR /&gt;See error logs for details&lt;/P&gt;
  &lt;P&gt;If I remove dynamic config line my code is giving me access_token value successfully..&lt;/P&gt;
  &lt;P&gt;How can I pass this access_token value to synamic attribute and later use it in REST receiver adapter to add custom http header value?&lt;/P&gt;
  &lt;P&gt;BR,&lt;/P&gt;
  &lt;P&gt;Rashmi&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2017 17:38:05 GMT</pubDate>
    <dc:creator>rasjoshi</dc:creator>
    <dc:date>2017-09-04T17:38:05Z</dc:date>
    <item>
      <title>How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaq-p/394522</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;My scenario is PROXY to REST  whereas Dynamic HTTP headers need to pass in Rest receiver channel, this header parameter.&lt;/P&gt;&lt;P&gt;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 .&lt;/P&gt;&lt;P&gt;UDF:&lt;/P&gt;&lt;P&gt;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 "";&lt;/P&gt;&lt;P&gt;How To configure in the receiver REST channel ?&lt;/P&gt;&lt;P&gt;Pleas help us to achiv  the same.&lt;/P&gt;&lt;P&gt;How to pass header name and Value Pattern in the receiver communication cahnnel.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 18:29:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaq-p/394522</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2016-12-14T18:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394523#M40439</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check the below blog for dynamic configuration attribute in Rest adapter&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2015/04/14/pi-rest-adapter-define-custom-http-header-elements/" target="test_blank"&gt;https://blogs.sap.com/2015/04/14/pi-rest-adapter-define-custom-http-header-elements/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2014/12/18/pi-rest-adapter-using-dynamic-attributes/" target="test_blank"&gt;https://blogs.sap.com/2014/12/18/pi-rest-adapter-using-dynamic-attributes/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 23:02:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394523#M40439</guid>
      <dc:creator>Harish</dc:creator>
      <dc:date>2016-12-14T23:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394524#M40440</link>
      <description>&lt;P&gt;I have done my self to slove the above issue.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 10:05:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394524#M40440</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-02-17T10:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394525#M40441</link>
      <description>&lt;P&gt;Hi Ravinder, can you please explain how did you achieve this ?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2017 11:03:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394525#M40441</guid>
      <dc:creator>former_member326050</dc:creator>
      <dc:date>2017-03-03T11:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394526#M40442</link>
      <description>&lt;P&gt;Hi Anju,&lt;/P&gt;&lt;P&gt;First we need to do the cahnges in above UDF. Rename the SAOP with REST. &lt;/P&gt;&lt;P&gt;Communication channel configuration's are like below.&lt;/P&gt;&lt;P&gt;note : It will accecpt only the "_" values not "-"&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/24073-channelconfiguration.png" /&gt;&lt;/P&gt;&lt;P&gt;In Additional Http Header :&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/24076-channelconfiguration.png" /&gt;&lt;/P&gt;&lt;P&gt;Hope it will help you.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ravi.S&lt;/P&gt;&lt;P&gt;7893366122&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 11:22:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394526#M40442</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-03-07T11:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394527#M40443</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/38945/sravinder.html"&gt;S RAVINDER&lt;/A&gt;,&lt;/P&gt;
  &lt;P&gt;I am getting access_token from REST lookup and now I am trying to add dynamic attribute and assign it a value of the acquired access token....&lt;/P&gt;
  &lt;P&gt;Could you please help me here?&lt;/P&gt;
  &lt;P&gt;my UDF for dynamic config -&lt;/P&gt;
  &lt;P&gt; finally{ // 5. close the accessor in order to free resources. if (accessor!=null) accessor.close(); } //return token; //Dynamic Configuration DynamicConfiguration dynConf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/REST", "XHeaderName1"); dynConf.put(key, token); return "";&lt;BR /&gt;&lt;/P&gt;
  &lt;P&gt;However, my UDF is giving error while testing -&lt;/P&gt;
  &lt;P&gt;Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of a null object loaded from a local variable at slot 8] in class com.sap.xi.tf._MM_SFDC_RESTAPI_QUOTE_STATUS_UPSERT_REQ_V1_ method newAccessToken[com.sap.aii.mappingtool.tf7.rt.Context@30f2539]&lt;BR /&gt;See error logs for details&lt;/P&gt;
  &lt;P&gt;If I remove dynamic config line my code is giving me access_token value successfully..&lt;/P&gt;
  &lt;P&gt;How can I pass this access_token value to synamic attribute and later use it in REST receiver adapter to add custom http header value?&lt;/P&gt;
  &lt;P&gt;BR,&lt;/P&gt;
  &lt;P&gt;Rashmi&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2017 17:38:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394527#M40443</guid>
      <dc:creator>rasjoshi</dc:creator>
      <dc:date>2017-09-04T17:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394528#M40444</link>
      <description>&lt;P&gt;How you achieve this?I have also the same requirement.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 16:25:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394528#M40444</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-11-19T16:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394529#M40445</link>
      <description>&lt;P&gt;Hello Ravi,&lt;/P&gt;&lt;P&gt;I am trying the same thing, u no success for me, if you can help me. please reply here&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sushant&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 13:04:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394529#M40445</guid>
      <dc:creator>SushantShinde</dc:creator>
      <dc:date>2019-04-10T13:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394530#M40446</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for this explanation, i was able to pass the Authorization Parameters via Dynamic Configuration.&lt;/P&gt;&lt;P&gt;However, the value of the parameters are visible in the message audit log (RESTOUT_HTTP_HEADER).&lt;/P&gt;&lt;P&gt;Is there anyway the Authorization Parameters can be passed in the HTTP Header as masked ?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 10:59:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394530#M40446</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-02-03T10:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394531#M40447</link>
      <description>&lt;P&gt;Anyway to do the same from REST Sender adapter? Basically I want to dynamically assign HTTP Header value which can get these values from PI Mapping result.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 16:13:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394531#M40447</guid>
      <dc:creator>former_member755757</dc:creator>
      <dc:date>2021-04-15T16:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: How Configure Dynamic HTTP header in REST Receiver Channel</title>
      <link>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394532#M40448</link>
      <description>&lt;P&gt;i have created the UDF with the above source code in the ESR-&amp;gt;graphical mapping tool.but iam sure if i need to map this udf with any of the target message type.also i want to know about how this udf will be used in the receiver Rest communication channel ?.&lt;/P&gt;&lt;P&gt;regards.&lt;/P&gt;&lt;P&gt;varma mandapati&lt;/P&gt;</description>
      <pubDate>Sun, 05 Nov 2023 18:30:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/how-configure-dynamic-http-header-in-rest-receiver-channel/qaa-p/394532#M40448</guid>
      <dc:creator>venkatasap</dc:creator>
      <dc:date>2023-11-05T18:30:35Z</dc:date>
    </item>
  </channel>
</rss>

