cancel
Showing results for 
Search instead for 
Did you mean: 

How to encrypt/decrypt an individual field of an XML message for Synchronous scenario in PI 7.3

Former Member
0 Kudos

Dear Experts/Friends,

I will explain the client requirement in brief, and followed by the questions. Again this is a banking scenario, sender side is ECC(FI/CO), and receiver third party system is a bank.Bank will only accept the data in the form of XML also will send the response in the form of XML.

from sender side I am utilizing RFC adapter to import the RFC structure, However from receiver side still I am in Dilemma between HTTP_ AAE and SOAP adapter.

I am Not considering SOAP adapter much because bank can not provide the wsdl structure. Below is the sender and and receiver XML structure.

SENDER XML

<?xml version="1.0"?>

<PaymentMessage>

  <PaymentTransaction>

    <CompanyCode>PARTNER01</CompanyCode>

    <SequenceNum>0000000000132180</SequenceNum>

    <TransactionData>:20:2000000058

:32A:020112SAR888,00

:50:SAUDI ARABIAN OIL COMPANY

BOX 5000

DHAHRAN

PARTNER ONE COMPANY

:52A:RIBLSARI

:53B:/111111111

:57A:NCBKSAJE

:59:/222222222

PARTNER ONE COMPANY

BOX 5300

DHAHRAN

PARTNER ONE COMPANY

:70:INV/0000002100

</TransactionData>

    <TransactionComment> Payment Message </TransactionComment>

  </PaymentTransaction>

  </PaymentMessage>

RECEIVER XML


<?xml version="1.0"?>

<PaymentMessageResponse>

  <PaymentTransactionResponse>

    <CompanyCode>PARTNER01</CompanyCode>

    <SequenceNum>0000000000132180</SequenceNum>

    <StatusCode>OK</StatusCode>

    <StatusDetail>Payment message posted successfully</StatusDetail>

  </PaymentTransactionResponse>

  </PaymentMessageResponse>

QUESTIONS

1- I need to encrypt only one highlighted field called "transaction data" in the above sender XML file, this field can occur multiple times in one file. please let me know how can I encrypt only a single field in the XML file in PI, and how to deal with the multiple occurrence of data.

2- Apart from the above field level encryption I also need to apply digital signature at message level, furthermore I need to enable SSL for transport level security as well.  By considering all in mind which adapter shall I use from Receiver side? HTTP_AAE of SOAP?

Any help pointer on this will be highly appreciated friends.

Thanks,

Farhan

Accepted Solutions (1)

Accepted Solutions (1)

former_member208404
Participant
0 Kudos

Hi Farhan,

1. You need to use either java mapping or a UDF to encrypt that field value. Can refer to the below link -> http://scn.sap.com/people/sandeep.maurya4/blog/2011/01/23/pgp-encryptiondecryption-using-java-code

2. HTTP_AAE should server your purpose.

Hope this helps!

Abhishek

Former Member
0 Kudos

Thank a lot Abhishek for your prompt response. I have gone through the blog link you have mentioned, however, I believe this talks about to encrypt the whole message, but in my case I need to encrypt only one field called "transaction data", highlighted in the sender XML.

Please let me know how can i utilize this code for my requirement?

Thanks,

Farhan

Former Member
0 Kudos

Hello Experts,

Any help on this please?

Regards,

Farhan

Former Member
0 Kudos

Hello,

Refer below article, similar to what u need:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ac06cf-6ee2-2c10-df98-e17430ca5...

Thanks

Amit Srivastava

Former Member
0 Kudos

Thank a lot Amit. I am trying to fit this in my requirement, I will keep posting if any issue. Please reply to my question in future as well.

Thanks again

Answers (0)