cancel
Showing results for 
Search instead for 
Did you mean: 

add Header data in Soap Receiver

former_member190681
Active Participant
0 Kudos

dear Experts,

I have a requirement from soap receiver I need to pass 2 soap header values in the receiver payload or receiver channel.

do u have any code or document please share.

please suggest.

Regards,

Kiran Polani

Accepted Solutions (1)

Accepted Solutions (1)

former_member186851
Active Contributor
0 Kudos

Hello Sri

You can use Module beans as well

former_member190681
Active Participant
0 Kudos

Dear,

Suggest after maintaining module tab  of Soap Receiver communication channel , is it required to maintain Adapter specific Message attribures or not?

Regards,

Kiran Polani

former_member186851
Active Contributor
0 Kudos

Hello Kiran,

If something coming from payload then keep it else not required.

former_member190681
Active Participant
0 Kudos

Dear,

currently I am using 7.0 sap pi , module parameter are working in which version. I think these module parameter are standard. if SAP PI 7.0 is not supported which option is suitable for this type of requirement.

Regards,

Kiran Polani

former_member186851
Active Contributor
0 Kudos

Just check with the parameters ,If not working you need to do with XSLT/JAVA.

Guess Muni already shared the links with you.

One More link for your reference

former_member190681
Active Participant
0 Kudos

Dear friends,

Thanks for your suggestion.

i tried so many ways but no use finally i tried to use XSLT Mapping got success.

Please find the code of XSLT Mapping.

To Add SOAP Envelope to request message is

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

<xsl:output method="xml"/>

<xsl:template match="/">

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Header />

   <soap:Body>

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

   </soap:Body>

</soap:Envelope>

</xsl:template>

</xsl:stylesheet>

To Extract SOAP Body from response message is

<xsl:stylesheet version="1.0"

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

    <xsl:template match="/">

        <xsl:apply-templates select="soapenv:Envelope/soapenv:Body/*"/>

    </xsl:template>

    <xsl:template match="@*|node()">

        <xsl:copy>

            <xsl:apply-templates select="@*|node()"/>

        </xsl:copy>

    </xsl:template>

</xsl:stylesheet>

Regards,

Kiran Polani

Answers (1)

Answers (1)

Muniyappan
Active Contributor
0 Kudos
former_member190681
Active Participant
0 Kudos

Dear,

Request :


we should add the headers as highlited in red color and same data should be come in response

Regads,

Kiran Polani

former_member186851
Active Contributor
0 Kudos


What are the values in the header?

Muniyappan
Active Contributor
0 Kudos

you have to add <Secret> value</Secret> <client-Id> value</Client-Id>..

try third case 3 mentioned in the blog.