cancel
Showing results for 
Search instead for 
Did you mean: 

How to add HTTP headers(header name and value) in sap pi server(ESR/ID) for requirement of rfc to soap synchronous communication with QOS is BE?

0 Kudos

Hi All,

I am SAP XI/PI Developer.I have a requirement ie rfc to soap scenario.It is synchronous interface.Quality of Service is Best Effort.

But, In my Requirement i need to tag two http header name and header value to soap xml payload, because receiver system validate the user name and password with http header name and value.then accept the request.Two HTTP header name and values are One time Client Id and Secret to be generated using API Portal hosted.

Here my question is where should i need maintain the http header name and header value in PI level?

Thanks & Regards

Devi Prasad.

Accepted Solutions (0)

Answers (3)

Answers (3)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi,


But, In my Requirement i need to tag two http header name and header value to soap xml payload, because receiver system validate the user name and password with http header name and value.then accept the request.Two HTTP header name and values are One time Client Id and Secret to be generated using API Portal hosted.

When you say HTTP Header, it is not part of the SOAP envelope. If you are referring to the latter, then XSLT/Java mapping will be your setup, along with checking Do Not Use SOAP Envelope . For the former though, you need to check ASMA and Variable Transport Binding in SOAP receiver CC. Afterwards, place the ClientID in XHeaderName1 and Secret in XHeaderName2 and then populate them using Dynamic Configuration.

Regards,

Mark

0 Kudos

Hi Mark,

Please see screens bellown

n

I add two http headers and values.but i got below error.

Can you explain clearly to maintain asma parameters and dynamic configaration.?

is it enough to maintain http header names in asma parameter?

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Polani,

Can you try executing the webservice using SOAP UI and then post a screenshot?

Regards,

Mark

Muniyappan
Active Contributor
0 Kudos

what is your pi version? you can use this

if this does not fit for your requirement, you can think of going for java/xslt mapping.

0 Kudos

Hi Muni M,

Version is xi 7.0

Thanks & Regards

Devi Prasad

former_member186851
Active Contributor
0 Kudos

Hello Polani,

You can check the links provided by Muni and Praveen

Additionally one more link

former_member182412
Active Contributor
0 Kudos

Hi Polani,

Check these blogs.

Or use below XSLT mapping after the mapping.


<?xml version="1.0" encoding="UTF-8"?> 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 

   <xsl:template match="/"> 

      <soap:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> 

         <soap:Header> 

            <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> 

               <wsse:UsernameToken> 

                  <wsse:Username>User</wsse:Username> 

                  <wsse:Password>Password</wsse:Password> 

               </wsse:UsernameToken> 

            </wsse:Security> 

         </soap:Header> 

         <soap:Body> 

            <xsl:copy-of select="*"/> 

         </soap:Body> 

      </soap:Envelope> 

   </xsl:template> 

</xsl:stylesheet> 

Make sure you enable the Do Not Use SOAP Envelope in the soap receiver channel if you use XSLT mapping.

Regards,

Praveen.