Skip to Content

Extended security for Invoice to Bank by making two Sync SOAP call

Invoice file need to be sent from local system to Bank securely. PI has to give a SOAP call twice to send an Invoice securely. In first call PI needs to get a Secured Auth Key(Unique Key) from the bank web service system which later PI will add in the SOAP message along with the required target message and will give another SOAP call to the bank web service system  to transfer the message securely.

Required Message should be zipped and Encoded which is later added into a specified element/XML tag in

Target Message. PI has to fetch the Auth Key for each transaction since it will expire in a specified time.

flow diagram.jpg

1. Receive File from Local Invoice System through FTP (source) and based on mapping logic convert into Required XML structure (target).

2. Compress (ZIP) the above XML and Encode in PI.

3. Sync Call to the first URL https://firstURL (with Username and Password in Payload which will differ for each landscape) to get an unique auth key(SOAP system will validate this auth key later when we send the Invoice content to the Bank(Step 5))

4. Generate the target structure based on bank wsdl which SOAP system will accept with Auth key received from step 3 and zipped Invoice content  (Step 2)

5. Call the second URL https://SecondURL to invoke the function (SOAP Action) with the Above Message.

SOAP System Validates the Auth Key and sends Positive/Negative Response back to PI based on Auth key validation and posts message to bank upon successful validation.

6. Return the error message to the user via email in case of negative response


  1. Zip the XML Content and it should be encoded and need to be mapped in to one of the field in target structure
  2. Sync call to SOAP system with User Credentials in Payload to get Auth Key and another Synchronous call to SOAP system to send the message with business content and received Auth Key which SOAP system will validate Auth key and trigger an email to end user based on negative validation

Step 1.

PI picks up a file from the Local FTP Server using File Channel.

Configure the file channel with necessary details to pick up the file from Local FTP server

Sender Agreement:

flow diagram.jpg

Step 2.

Receiver Determination is created between Sender and BPM with Operation Mapping in the Interface Determination. The Operation Mapping contains two mapping, Message Mapping and Java Mapping.

Interface Determination:

flow diagram.jpg

a). Message Mapping – Used to map the Input payload in to the target required format.(business content)

b). Java Mapping – Above xml message is zipped , encoded and mapped to specific Target field

Operation Mapping: Message Mapping and Java Mapping

flow diagram.jpg

Java Mapping:

flow diagram.jpg

Step 3. BPM Steps

flow diagram.jpg

a). BPM Step 1: BPM receives the output of the Java Mapping as an Input and the First Sync Send step gives sync call to SOAP system using first URL. Interface Determination has a Sync Mapping, Request– User and Password in Payload and Response message will contain an Auth key (Unique Key)

flow diagram.jpg

b).BPM Step 2: Mapping Transformation Step 2:1 Mapping (Output of the Java Mapping as a First Message and  Response from the SOAP system as a Second Message) , Create a Target Message Structure which SOAP system required, Now target message(XML) has a Zipped content and Auth keys as mentioned in below screenshot

Message Mapping:

flow diagram.jpg

c). Step 3: Call the target second URL to send the constructed target message to the SOAP System. System will first authenticate the Auth Key “Unique Key” from the payload and pass the data to Bank post successful validation. Interface Determination step has a Sync Mapping which above message is request and validation result (Positive/Negative) as a response

Communication Channel:

flow diagram.jpg

d) . BPM Step 4:Async Send: Send the alert email to the user in case of negative response received from SOAP system due to validation failure.

Create a Receiver Determination between Integration Process and Mail System

flow diagram.jpg

Create Receiver Agreement between Integration Process and Mail System and Configure mail Receiver channel

flow diagram.jpg

SAP PI Version:7.1

You must be Logged on to comment or reply to a post.