on 12-01-2018 10:21 AM
Hi
We are in PI 7.1 with SP9. We have flow from FTP NSF to FTP NSF only. we need to pick .xml and .pdf files and zip the files. In FTP NSF I have used Additional Payloads option to pick the pdf file with the same xml file name. In the receiver channel I have used
PayloadZipBean to zip both files. Issue is that zip file name is coming properly but the xml and pdf file names are changed. xml file name changed to MainDocument and the pdf file name changed to AdditionalFile.
Howe can I get the 2 files with the actual name of like how it was picked.
Example : Sender channel picking test.xml and test.pdf then I need zip file name like test.zip and it contains 2 files with the same actual names like test.xml and test.pdf
-Thanks -Lakshman
Hi Lakshman!
I would try to make use of "Content-Type" header both for main payload and attachment to store original file names.
Take a look at the thread describing the similar approach:
Author uses adapter module to set Content-Type, but the same result could be achieved by using message mapping, I guess.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
I know this is an old one but since the OP did not come back with a solution... 🙂
When talking message mapping, did you assume that the XML part of the file tuple would be actually mapped (hence the structure is known / stable or in other words the XML files do not differ in structur from another?
Would your suggestion also work in a pass through szenario?
TBH I until now did not have the requirement to simply zip a file in PI on a pass through szenario with the same file name (test.txt gets test.zip with inner test.txt) but I find it utterly amusing that this seems so hard that one needs to got through all the hoops and ultimately needs to develop an adapter module. Sometimes PI is brutaly simple, sometimes brutaly hard on such easy requirements.
Cheers
Jens
Hi Jens!
When talking about message mapping I actually meant java mapping or XSLT mapping, for example, where we just copy input payload to output and change content type.
In pass-through scenario we don't use ESR objects, so, we can't use mapping objects. In this case adapter module development could be the possible workaround.
Regards, Evgeniy.
Hi Lakshman,
You can use an OS command to zip the files and then use your sender comm channel to pick it up.
Regards,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark!
I guess, OS command for zipping files on FTP server, which is executed on PI server is rather complicated to implement.
Regards, Evgeniy.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.