on 08-24-2016 1:11 PM
hi
i have one scenario which is to pick zip file from one ftp and to drop it on other ftp as a text files.
then i tested it and i get files with unreadable format(content get changed).
but when i try to drop zip file the file content will not change.
so what is the problem with it or did i miss something on my configuration
please help me
thanks
Hi,
the issue is that you try to store binary file (zip file) as an text file. You have to use binary as file type in the file adapter.
If you want to unzip the zip file and you want to store the content of the zip file, you have to use the Payloadzip-Bean as an adapter modulle
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi all
am trying to use java code in massage mapping the code provided by Praveen Gujjeti in
now am facing the below error in sxmb_moni
<SAP:P3>Content is not allowed in prolog.</SAP:P3>
<sap stuck> Runtime exception occurred during application mapping com/sap/xi/tf/_MM_zip_; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Content is not allowed in prolog.<sap stuck>
as i said earlier my senario is to pick zip file(which contain multiple files) from ftp and to put files as .txt in other ftp.
can any body help me in this issue?
please help am new for sap pi
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Getinet,
message mapping expects XML as input.
You have to write a Java mapping by yourself.
see for example:
but keep in mind that you need a multi message mapping.
Much easier would it be, if you use the PayloadZipBean in the receiver adapter. In this case, however, you cannot access the payload in PI (i.e. no content based routing)
Best regards,
Peter
thanks all for your replay
now its working fine for the first file but its ignoring other files
is there any module to unzip many files or i have to use java code?
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Along with PayloadZipBean additionally use Messahe transformBean and make the content type text/xml. I guess your content type is getting changed.
Thanks,
Apu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
dears
i used PayLoadZipBean module in sender channel
bzw it work perfect to drop the same zip file but when try to drop .txt file file content will show like the below format.
PK Jn I‰7Ú & - a1.txtK-I- ¢T…ÊÊÊT ’IJäâäô” ^®â””ÔôôT0LO PK Un IÍ…Fþ a2.txt31ååJL PK Jn I‰7Ú & - $ | a1.txt | ||
¦¬z úÑ ¦¬z úÑ P+¥z úÑ PK Un IÍ…Fþ $ | J a2.txt | ||
¹ì£ˆ úÑ ¹ì£ˆ úÑ B¢œˆ úÑ PK | ° v |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Getinet,
If am not wrong multiple files cant be unzipped using the payload bean.
Try the approach in the below link
When you say unreadable format(content get changed) is the format of the file or and content inside it its getting corrupted .
How are you unzipping the file ? Using java or PaylaodZipBean ?
Br,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.