Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Former Member

The requirement is to create a synchronous IDoc to SOAP scenario using certificates (https communication) without using ccBPM.

Also demonstrated the usage the parameterized XSLT mapping for creating custom SOAP envelop.

Usage of Java Only approach (AAE) to achieve this functionality by using standard modules Request Response and Response One Way Bean.

Some highlights:

  • Synchronous Messaging: IDoc to SOAP synchronous scenario. Receive responses from web-service and map it to ALEAUD IDocs and post it into SAP ECC.
  • Secured Communication: Usage of Certificate for https communication from SAP PI to Web-service
  • Custom Envelope – Creation of Custom SOAP envelop for request and response mapping using parameterized XSLT. The SOAP envelope changes based on the Sender Service (SAP Business System in Dev, QA and PRD).
  • Java Only Approach (usage of AAE): Usage of IDoc_AAE and standard modules, Request Response Bean and Response One Way Bean. No usage of ccBPM.

This functionality is tested on Tested on PI 7.3 Ehp1 SP 7 patch level 33 for XI ADAPTER FRAMEWORK(SAP_XIAF) using ECC 6.0.


1. Support Packages and Patches should be applied as per SAP note: 1964506

2. Latest patches should also be applied for SAPXIESR, MESSAGING and SAPXITOOL

3. SAP note 1810884 to be applied for JCE Unlimited Strength

4. SOAP UI to view the RAW XML structure for a successful posting to the web-service

Install the certificate in NWA of PI.

Go to the URL provided by Legacy Team and import the certificate.

Click on View Certificates:

Select the complete Certificate Chain. Select ALL as highlighted.

Copy to File..

Proceed as follows:

Click on Finish. The certificate is created.

Load the certificate into NWA of SAP PI.

Go to Configuration --> Certificates and Keys --> Trusted CA’s (certificate can be loaded in any other location also)

We can extract the WSDL from the Webservice URL.

Load the WSDL into External Definition of SAP PI.

Create Sender Service Interface. This uses the Request and Response Idocs EXCHANGE_RATE and ALEAUD respectively.

Create Receiver Service Interface (this uses the External Definition created earlier)

Create the Message Mapping and Operation Mappings.

After mapping the EXCHANGE_RATE IDoc to target structure using graphical mapping, we have to write an XSLT mapping to create a custom SOAP envelop for the request message. Crate 2 levels of mapping: XSLT and Graphical.

Operation Mapping - Response

Now,have to make use of SOAP UI to get a RAW XML message (RAW XML screen-shot below).

This RAW XML message is used to create the custom SOAP Envelope using XSLT mapping

SOAP UI screenshot of successful request sent to the webservice

Design the XSLT mapping based on the SOAP UI RAW XML.

The XSLT mapping also uses parameters to determine the system based on “Sender_Service”.

The parameter “Sender Service” is highlighted in RED.

<!-- <xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:ns0="XXXXXXXXXXXXXXXXXXXXWSSoap1/" xmlns:ns1="https://XXXXXXXXXXXXXXXXXXXXXX/Currency_Tool_Web_Service/" exclude-result-prefixes="ns0 ns1">  -->

<xsl:stylesheet version="1.0" xmlns:xsl="" xmlns:ns0="" xmlns:ns1="http://schemas.XXXXXXXXXXXXXXXXXXXXXXXXX.UI.WebService" exclude-result-prefixes="ns0 ns1">

<xsl:output method="xml" encoding="UTF-8"/>

<xsl:param name ="SenderService"/>

  <xsl:template match="/">

<!-- <soapenv:Envelope xmlns:cur="https://XXXXXXXXXXX/CurrencyWSSoap1/" xmlns:cur1="https://XXXXXXXX/CurrencyWSSoap1/Currency_Tool_Web_Service/"
xmlns:soapenv=""> -->

<soapenv:Envelope xmlns:tem="" xmlns:det=""

<xsl:variable name="SenderSrv">

<xsl:value-of select="$SenderService"/>


<xsl:if test="$SenderSrv = &apos;BS_ECC_ZE1120_DV&apos;">

<soapenv:Header xmlns:wsa=""><wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse=""><wsse:UsernameToken wsu:Id="UsernameToken-1"



<xsl:if test="$SenderSrv = &apos;BS_ECC_QE1100_QA&apos;">

<soapenv:Header><wsse:Security soapenv:mustUnderstand="1" xmlns:wsse=""><wsse:UsernameToken wsu:Id="UsernameToken-2"


<xsl:if test="$SenderSrv = &apos;BS_ECC_PE1100_PR&apos;">

<soapenv:Header xmlns:wsa=""><wsse:Security soapenv:mustUnderstand="1"
wsu:Id="UsernameToken-1" xmlns:wsu=""><wsse:Username>XXXXXXXXXX</wsse:Username><wsse:Password









<det:Date_from><xsl:value-of select="ns1:Date_from"/></det:Date_from>

<det:Id><xsl:value-of select="ns1:Id"/></det:Id>

<det:Rate><xsl:value-of select="ns1:Rate"/></det:Rate>










Please also read the  the Integration Directory and the response mapping in the second part of the blog IDoc to SOAP scenario using Certificates to create an Asynch-Synch Bridge: Part II

This is my first blog in SCN. Kindly request you to share you feedback and comment :smile:

Labels in this area