<?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: xslt mapping with java - set value header in soap receiver in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422306#M53980</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your username and password is static or it will vary?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apu&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 04:42:35 GMT</pubDate>
    <dc:creator>apu_das2</dc:creator>
    <dc:date>2017-05-17T04:42:35Z</dc:date>
    <item>
      <title>xslt mapping with java - set value header in soap receiver</title>
      <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaq-p/422305</link>
      <description>&lt;P&gt;Hi Expert,&lt;/P&gt;&lt;P&gt;I want to send user and pass in the header to soap receiver, but it does not work.&lt;/P&gt;&lt;P&gt;I have created the following xslt mapping&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;	&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	 xmlns:map="java:java.util.Map"
     xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
     xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey"&amp;gt;		 
	&amp;lt;xsl:output method="xml" encoding="utf-8" indent="no"/&amp;gt;	
	&amp;lt;xsl:param name="inputparam"/&amp;gt;
	&amp;lt;xsl:template match="/"&amp;gt;
		&amp;lt;xsl:variable name="dynamic-conf"  
        select="map:get($inputparam, 'DynamicConfiguration')" /&amp;gt;
		&amp;lt;xsl:variable name="dynamic-key"   
			select="key:create('http://sap.com/xi/XI/System/SOAP', 'XHeaderName1')" /&amp;gt;
		&amp;lt;xsl:variable name="dynamic-value" 
			select="dyn:get($dynamic-conf, $dynamic-key)" /&amp;gt;
		&amp;lt;xsl:variable name="new-value"     
			select="concat($dynamic-value, 'admin')" /&amp;gt;
		&amp;lt;xsl:variable name="dummy" 
			select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" /&amp;gt; 
			
		&amp;lt;xsl:variable name="dynamic-key1"   
			select="key:create('http://sap.com/xi/XI/System/SOAP', 'XHeaderName2')" /&amp;gt;
		&amp;lt;xsl:variable name="dynamic-value1" 
			select="dyn:get($dynamic-conf, $dynamic-key1)" /&amp;gt;
		&amp;lt;xsl:variable name="new-value1"     
			select="concat($dynamic-value1, 'admin')" /&amp;gt;
		&amp;lt;xsl:variable name="dummy1" 
			select="dyn:put($dynamic-conf, $dynamic-key1, $new-value1)" /&amp;gt; 			
	&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/"&amp;gt;
	   &amp;lt;soapenv:Body&amp;gt;					    	
		&amp;lt;xsl:copy-of select="*" /&amp;gt;
	   &amp;lt;/soapenv:Body&amp;gt;
	&amp;lt;/soapenv:Envelope&amp;gt;
	&amp;lt;/xsl:template&amp;gt;
	&amp;lt;/xsl:stylesheet&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the communication channel, I have marked "Do not use SOAP Envelope" and "Keep Headers"&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34643-2017-05-16-14-22-57.png" /&gt;&lt;/P&gt;&lt;P&gt;And Activated ASMA&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34645-2017-05-16-14-22-34.png" /&gt;&lt;/P&gt;&lt;P&gt;I have marked the option "Use SAP XML Toolkit" in OM&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34646-2017-05-16-15-51-13.png" /&gt;&lt;/P&gt;&lt;P&gt;When I run no error appears in sxi_monitor, and generates the following xml without tag header:&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34647-2017-05-16-14-22-03.png" /&gt;&lt;/P&gt;&lt;P&gt;But "DynamicConfiguration" is OK.&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34648-2017-05-16-15-58-49.png" /&gt;&lt;/P&gt;&lt;P&gt;Finally the response from the webservice indicates that neither user nor paaword has been sent:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/34649-2017-05-16-16-00-45.png" /&gt;&lt;/P&gt;&lt;P&gt;Any help will be highly appreciated. &lt;/P&gt;&lt;P&gt;Regards, Joel&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 21:07:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaq-p/422305</guid>
      <dc:creator>former_member442887</dc:creator>
      <dc:date>2017-05-16T21:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: xslt mapping with java - set value header in soap receiver</title>
      <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422306#M53980</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Your username and password is static or it will vary?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Apu&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 04:42:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422306#M53980</guid>
      <dc:creator>apu_das2</dc:creator>
      <dc:date>2017-05-17T04:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: xslt mapping with java - set value header in soap receiver</title>
      <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422307#M53981</link>
      <description>&lt;P&gt;Hi Joel!&lt;/P&gt;&lt;P&gt;If your header elements are static you can use AddSOAPHeaderBean to add it to message header:&lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2013/11/22/addsoapheaderbean-module/" target="test_blank"&gt;https://blogs.sap.com/2013/11/22/addsoapheaderbean-module/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Otherwise you should manually construct Header section of SOAP message in your XSL transformation. That's what you set parameter "Do not use SOAP Envelope" for.&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;EM&gt;&amp;lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;xsl:template match="/"&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;soap:Header&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;ServiceAuthHeader  xmlns="http://WIND.WEBSERVICES.DMS/"&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;lt;Username&amp;gt;USER&amp;lt;/Username&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;Password&amp;gt;PASSWORD&amp;lt;/Password&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;/ServiceAuthHeader&amp;gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;/soap:Header&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;soap:Body&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;xsl:copy-of select="*"/&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;/soap:Body&amp;gt;&amp;lt;/soap:Envelope&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;/xsl:template&amp;gt;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;&amp;lt;/xsl:stylesheet&amp;gt;&lt;/EM&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Regards, Evgeniy.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 07:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422307#M53981</guid>
      <dc:creator>former_member190293</dc:creator>
      <dc:date>2017-05-17T07:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: xslt mapping with java - set value header in soap receiver</title>
      <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422308#M53982</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Thank you for answering me, when it is static if it works, but the values must be variable and sent from the abap proxy.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 08:39:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422308#M53982</guid>
      <dc:creator>former_member442887</dc:creator>
      <dc:date>2017-05-17T08:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: xslt mapping with java - set value header in soap receiver</title>
      <link>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422309#M53983</link>
      <description>&lt;P&gt;Hi Joel!&lt;/P&gt;&lt;P&gt;In this case you could use XSL transformation as shown above.&lt;/P&gt;&lt;P&gt;Besides this, SOAP Axis adapter supports header insertion.&lt;/P&gt;&lt;P&gt;Regards, Evgeniy.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 08:55:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/xslt-mapping-with-java-set-value-header-in-soap-receiver/qaa-p/422309#M53983</guid>
      <dc:creator>former_member190293</dc:creator>
      <dc:date>2017-05-17T08:55:20Z</dc:date>
    </item>
  </channel>
</rss>

