Skip to Content
avatar image
Former Member

Handling SOAP HEADER using SOAP Receiver Adapter

Hi Experts,

I need to implement SOAP Receiver Scenario and passing ( Header fields User, Password and token) I have seen a lot of scenario using a XSLT Mapping, to handling the SOAP Header. So need to help to understand some details:

Suppose I need to implement the SOAP Header below? In this case I need add only the fields u201CUsername, Password and AuthenticationTokenu201D. I created the XSLT Transform, the source XML? Where I put it? Or can create it into Message Interface?

Is it possible to do this in Java Mapping?

Thanks!

Best Regards

Fábio Ferri

<soap:Header>

<v1:ExecutionHintHeader>

<v1:Name></v1:Name>

<! Optional: >

<v1:Arguments>

<! 1 or more repetitions: >

<v1:Argument Name="?" Value="?"/>

</v1:Arguments>

</v1:ExecutionHintHeader>

<v1:CredentialsHeader>

<! Optional: >

<v1:Username>pi</v1:Username>

<! Optional: >

<v1:Password>jhjhjjhjhjius</v1:Password>

<! Optional: >

<v1:AuthenticationToken></v1:AuthenticationToken>

</v1:CredentialsHeader>

</soap:Header>

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 18, 2011 at 09:38 PM

    You can also change the header information by using the DynamicConfigurationBean

    http://help.sap.com/saphelp_nw04s/helpdata/EN/45/da2239feb22e98e10000000a155369/content.htm

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 18, 2011 at 09:44 PM

    XSLT mapping is better option.

    As you mentioned, you have already created XSLT transform, import it as Imported arhives file & use it as mapping in Operation mapping.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 19, 2011 at 06:26 AM

    Hi ,

    You might need to use Axis Framework in SOAP Adpater.

    Axis is an open source library for web services. & Process Integration 7.1 uses the Apache Axis framework to enhance the

    ability of the standard SOAP adapter.

    In your case Axis adapter can be an ption to configure a channel to use the UsernameToken authentication of WS-Security.

    for FAQs & use of Axis Adpater, refer SAP NOte - 1039369.

    you may also refer [axis-framework-in-soap-adapter-in-pi-71;

    Thanks!

    Jyoti

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 19, 2011 at 07:16 AM

    Check out my blog article:

    http://simonlesflex.wordpress.com/2011/01/26/sap-pi-customize-message-with-xslt-mapping/

    Here you can find the xslt code for solve your problem.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      You need to put XSLT mapping in 2° step mapping in request.

      SourceMessageRequest -> Message Mapping -> XSLT Mapping -> DestinationMessageRequest

      If you test mapping program, this should be working fine.

      In adapter module, put localejbs/AF_Modules/MessageTransformBean with parameter value text/xml; charset=utf-8 and correctly set Conversion Parameter "Do not use Soap Envelop"

      XSLT Request Mapping

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

      <xsl:template match="/">

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

      <soap:Header>

      <ServiceAuthHeader xmlns="http://WIND.WEBSERVICES.DMS/">

      <Username>USER</Username>

      <Password>PASSWORD</Password>

      </ServiceAuthHeader>

      </soap:Header>

      <soap:Body>

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

      </soap:Body></soap:Envelope>

      </xsl:template>

      </xsl:stylesheet>

  • Apr 18, 2011 at 09:35 PM

    You can create SOAP Header using XSLT mapping or Java mapping. YOu need to import your mapping in the operation mapping screen. Basically consecutive mapping. Use XSLT mapping first and then your message mapping.

    Edited by: Baskar Gopal on Apr 18, 2011 7:26 PM

    Add comment
    10|10000 characters needed characters exceeded