Skip to Content
avatar image
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>

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 comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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>

    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 17, 2011 at 07:17 AM

    Thank you for everyone,I have solved this problem

    Add comment
    10|10000 characters needed characters exceeded