cancel
Showing results for 
Search instead for 
Did you mean: 

PGP Decryption Module error

Former Member
0 Kudos

Hi All,

I am trying to Decrypt the file in PI by using Decryption module. I am getting the below error.

Error while sending message: Cannot send message to module processor com.sap.aii.af.lib.mp.module.ModuleException

Error: com.sap.aii.adapter.xi.routing.RoutingException: Unable to parse XML message payload to extract operation

below is my configuration details. Please help me in resolving this. I need this bit urgent.

Accepted Solutions (1)

Accepted Solutions (1)

engswee
Active Contributor
0 Kudos

Hi Gayathri

It might be the decrypted payload does not match your service interface definition. Make sure the root node of the decrypted XML payload is the same as the name of the message type used in the service interface.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng,

Thanks for your quick Reply.

Can I ask the business user to send the xml file. I have one more doubt here the file which they placed in directory will be in Decrypted format right, how can I check the content whether it is matched to my Service interface root node.

Appreciate your quick reply.

Thanks,

Gayathri.

Former Member
0 Kudos

You mean the root node in the decryption file is same like MT_Mercer_Enrolment_Out.

engswee
Active Contributor
0 Kudos

Hi Gayathri

I'd suggest you create a separate scenario just to see if you can decrypt the file correctly and view the contents. It should be a pass through scenario, and use the decryption module in the receiver channel instead of the sender channel.

Rgds

Eng Swee

manoj_khavatkopp
Active Contributor
0 Kudos

Hi,

Yes you may ask the XML file which business has encrypted and check if the XML is fine by putting it in message mapping , the file which business has placed in server is in PGP encrypted format ..OR another workaround take that encrypted file only then use some online tool to decrypt it using your private key and password.

Br,

Manoj

engswee
Active Contributor
0 Kudos

Yes, assuming that is the MT used in the sender service interface.

Former Member
0 Kudos

Decryption will be done only in Sender channel right?

or Do i need to create a sample POC where source file will be in encrypted file and in the receiver channel I have to include DEC module. Is my understanding correct?

Thanks,

Gayathri.

Former Member
0 Kudos

Hi Manoj,

In my case I don't have message mapping.

I can ask business people to send me the encrypted xml file.

Can you send me the link for online decryption tool if you have any.

Thanks,

Gayathri.

engswee
Active Contributor
0 Kudos

Yes, normally you'd do decryption in sender channel, but since you are having errors, you need to do POC. For that, best to just focus on decrypting the file first to be able to view the content. Your understanding of the POC scenario is correct.

Former Member
0 Kudos

Gayathri

Why did you mention partner public key in you configuration when you are decrypting the file.

It should only mentioned when you encrypt the file.

Thanks

Ashish

manoj_khavatkopp
Active Contributor
0 Kudos

So then better you would try Eng suggestion of doing bypass scenario first just mention Decryption module in sender channel remove all the FCC mentioned , however i guess it will fail in PI with error : content not allowed but at least you can check the decryption functionality.

manoj_khavatkopp
Active Contributor
0 Kudos

Guess she is using Signing too.

engswee
Active Contributor
0 Kudos

You cannot test it in the sender channel because any failure will not persist the message, therefore you cannot see the decrypted content.

Former Member
0 Kudos

Hello Eng,

Actually I do have one more scenario where I am encrypting the file, to use that file as input in my POC do I need to use the same source structure here.

Thanks,

Gayathri.

engswee
Active Contributor
0 Kudos

Are you trying to encrypt or decrypt?

Former Member
0 Kudos

I am trying to decrypt

engswee
Active Contributor
0 Kudos

If you are trying to decrypt, that means the file was already encrypted with the sender's private key. You will have to decrypt with the sender's public key. Unless you too have access to the sender's private key, there is no way that you can simulate encrypting the file yourself.

Former Member
0 Kudos

Hi Eng,

I have done the complete scenario and it is working for me. When it comes to real interface I am facing the error. Unfortunately due to sensitive data she was unable to send the file to me.

I got the below reply from the user:

what I can see it has always been sent as a comma delimited file.  The only change is that I encrypted the file before placing the file onto our SFTP server.

Could the issue be that there is only a linefeed at the end of reach record instead of a carriage return/linefeed?


Suggest me how to proceed further on this.


Thanks,

Gayathri.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Gayathri,

If the user is stating that the file is comma delimited then that means you would need to use the MessageTransformBean in the same way you would setup the FCC for a regular file channel to get it into the necessary XML format.  Once you have that in place then your system will be able to recognize the message and route it appropriately.


Regards,

Ryan Crosby

Former Member
0 Kudos

Hi Ryan,

Suppose below is my Source structure. Could you please help me how to use transform bean in SFTP sender channel to handle the error.

Thanks,

Gayathri.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Gayarathi,

It does depend a little bit on the comma delimited file structure and how the data is laid out.  I see that you only have on occurrence in your message type - the employee information for this file doesn't have repeating lines for different persons?

Regards,

Ryan Crosby

Former Member
0 Kudos

I dont know whether repeated lines will come or not, but above is my source structure I should able to Decrypt it.

Sample Data is as below.

this is a dummy test file from Pilar Burg on the MGTI Data Transfer Team at Marsh/Mercer this is a dummy test file from Pilar Burg on the MGTI Data Transfer Team at Marsh/Mercer this is a dummy test file from Pilar Burg on the MGTI Data Transfer Team at Marsh/Mercer this is a dummy test file from Pilar Burg on the MGTI Data Transfer Team at Marsh/Mercer this is a dummy test file from Pilar Burg on the MGTI Data Transfer Team at Marsh/Mercer


Out put should come in the above format.

manoj_khavatkopp
Active Contributor
0 Kudos

Gayathri,

i would suggest for safer side better you change the structure i.e include all your fileds under one header node records with this you can handle multiple as well as  single line item .

Once done then include MTB module after your PGPdecrytpion module then convert the incoming CSV ( hoping as it is , delimited ) and convert to XML.

Br,

Manoj

Former Member
0 Kudos

Hi Manoj,

Sorry for the late reply.

Still I am facing the issue. I have requested business people to send structure of the file. Once I got that I can able to test the scenario and let you know accordingly.

Thanks,

Gayathri.

Answers (2)

Answers (2)

vicky20691
Active Contributor
0 Kudos

hi,

gayathri, are you using fcc with sftp channel, if yes can u send the fcc configuration screenshot.

in case you do use fcc and cant give screenshot just replace fcc with messageTransformbean. in the below order-

1. pgpdecryption

2. mtb

3. callsapadapter

Former Member
0 Kudos

Hi Gayathri,


Generate private and public keys and encrypt and decrypt the data online tools are available.

For example : iGolder

using above online free PGP Key generator tool decrypt your encrypted data using private key and check that data match your service interface definition or not.

I am also facing same above mentioned issue  because of mismatched data.

Regards,

Guruprasad

Former Member
0 Kudos

Hi Guru,

I did a POC internally in my Development system for both Encryption and Decryption. I have generated source file with Encrypted  data in one interface and I used the same data as input file and tried to debug it and it worked successfully. When it comes to my actual Requirement I am still facing the error.

I asked Business user to send the file as it was sensitive data she was unable to send it to me.

And she has replied one line:

what I can see it has always been sent as a comma delimited file.  The only change is that I encrypted the file before placing the file onto our SFTP server.

Could the issue be that there is only a linefeed at the end of reach record instead of a carriage return/linefeed?


Could you help with her inputs.


Thanks,

Gayathri.

nitindeshpande
Active Contributor
0 Kudos

Hi Gayathri,

Request you to decrypt the file sent from the business and drop the file on to a temporary FTP folder using file receiver channel and see what is the actual content.

Based on this actual content develop your interface, such that it matches the structure and you will not receive the Unable to parse XML error.

Regards,

Nitin

Former Member
0 Kudos

Hi Nithin,

As part of this Interface, I have done one more POC where no ESR part in present.

Only by creating ICO i am trying to achieve this. I have placed one encrypted file in PI internal server ans was trying to decrypt with PGP Decryption Module.

I am facing the below error in PI.

Note: I  am using the same server public key for encrypting.

Appreciate your quick reply!

Thanks.

manoj_khavatkopp
Active Contributor
0 Kudos

You get check-sum error when you dont mention pass-phrase in the module please add this parameter and give the respective password.

Former Member
0 Kudos

Hi Manoj,

Thanks it worked.