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

How to add a soap header in the mesage

Hi expert:

We have a problem about this synchronous scenario: ECC(ABAP Proxy) >PI >P6(SOAP), In P6,it need additional soap header as below:

<soapenv:Header>

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

<wsse:Username>admin</wsse:Username>

admin" target="_blank">adminhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin>

</wsse:UsernameToken>

</wsse:Security>

</soapenv:Header>

How can i add this header to the receiver message?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 16, 2011 at 09:30 AM

    Hi,

    You can use JAVA or XSLT mapping to achive this.

    refer this

    Add field inside SOAP header PI 7.1

    http://knbintegration.com/blog/?p=181

    Or

    The axis adapter comes with a convenient header insertion handler where you can insert an arbitrary header using a template.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 16, 2011 at 02:55 PM

    >How can i add this header to the receiver message?

    You want custom header. So check the option "Do not use Envelope" in the soap receiver channel. You can create soap header using Java or XSLT mapping. You need web service security features like Username token so better go with Java mapping. Refer Apache Axis open source API for coding. If the requirement is simple and the values are pretty static then go with XSLT mapping.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 17, 2011 at 12:05 AM

    Hi

    Create an XSL file like below and use in your mapping.

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

    http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:template match="/">

    <soapenv:Header>

    http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

    http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">

    <wsse:Username>admin</wsse:Username>

    admin" target="_blank">adminhttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin>

    </wsse:UsernameToken>

    </wsse:Security>

    </soapenv:Header>

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

    </xsl:template>

    </xsl:stylesheet>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 17, 2011 at 07:17 AM

    Thank you for everyone,I have solved this problem

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.