cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP + PGP - Decryption - File to XML

Former Member
0 Kudos

Hello,

We have a situation at hand where in we are doing SFTP + PGP - decryption.

Our scenario is File ( SFTP ) to PI ( 7.31 SP 16) to Proxy( SAP system).

We are able to decrypt the payload from our vendor the only place where we are stuck is when we transform the output after decryption to XML. we get an "error content not allowed in prolog"

File structure

HeaderField 1 , HF2 , HF3 , HF4 , HF5

Row1DataF1 , Row1DataF2, R1DF3 , R1DF4, R1DF5 (NewLine)

Row2DataF1 , Row2DataF2, R2DF3 , R2DF4, R2DF5 (NewLine)

ProxyStructure

Results

  ->Header

      ->F1

      ->F2

      ->F3

      ->F4

      ->F5

Error: Content not allowed in prolog

SFTP Channel configuration:

Accepted Solutions (0)

Answers (2)

Answers (2)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Jitesh,

                  First we need to trace out reason of error. try this, break the scenario into two ico's.

as shown

sftp ----------> decrypt------->file (NFS)

then in second ico

File--------FCC (without module) -------------------> proxy

See if you get proper result.

If you are able to eliminate error then there is issue with parameters provided to messagetransform bean, you need to correct the same.

Regards

Anupam

Former Member
0 Kudos

Anupam,

Firstly thanks for the reply... Great minds think alike!

We have tried the following approach and it works fine with this approach.

SFTP ---> Decrypt ------> File( NFS)

File -----> FCC( content conversion ) -----> proxy

This works absolutely fine , narrowing down to two possibilities

1. Could there be any issues with the header records in the file ? ( Asked vendor to send a file without any header records)

2. Could there be any issue while first bean trying to decrypt the message in XML itself ? ( any idea what is by default the o/p of DECRYPT bean ?) ( we even tried to remove the 2nd bean to see what the o/p looks like it is just like any other txt file )

Thanks,

Jitesh

anupam_ghosh2
Active Contributor
0 Kudos

Hi Jitesh,

                 Add the decryption module in sender adapter and check the output flow to messageTransformbean.

Then other way round create a scenario where sender is normal file  and apply  messageTransformbean in receiver adapter and check the output. Alter the source file to get correct result.


sample txt file without encryption------------>file sender adapter-------->messageTransformbean--.receiver adapter



I am sure the parameters to messageTransformbean needs correction.

If you can manage an output without errors , your queries are answered.

Regards

Anupam

anupam_ghosh2
Active Contributor
0 Kudos

Hi Jitesh,

                Can you please provide sample csv file and required xml output.

Regards

Anupam

GauravKant
Contributor
0 Kudos

Hi Jitesh,

Did you check this ? Pls have a look and try.

Regards,

Gaurav

Former Member
0 Kudos

Hi Gaurav,

Thanks for the reply, we did go through this link and we tried this but this didn't help. we are still getting the error.

Thanks,

Jitesh

GauravKant
Contributor
0 Kudos

Hi Jitesh,

Check for any junk character like and also make sure there's no hidden white space at the start of your xml file.