cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi all,

This is my first post on SCN. I hope to be a positive resource to this community. 🙂 I wanted to ask a question I have been riddled with for some time. We had the requirement to use a sender file adapter for zipped plain text files (sort of CSV file).

Issues I encountered:

  1. GZip is not really supported by the PayloadZipBean: I assume there is no way around this (Question 1), so we decided to switch to normal Zip files
  2. Using File Content Conversion:
    • Apparently this is not possible, as it tries to convert the inbound zip file into an XML: replaced this by the MessageTransformBean.
    • So at this time, the modules set up are: PayloadZipBean with mode set to unzip, afterwards, the MessageTransformBean with all the parameters set up correctly. This was working fine, as long as the input did not contain any special characters. So on to the next issue.
  3. The plain text files are in codepage ISO-8859-1. I have tried TextCodepageConversionBean with the conversion.charset set to utf-8. I have also tried to use the XMLAnonymizerBean (and changing the charset of the XML to ISO, but no result) before the MessageTransformBean. However, this still results in special characters being replaced by ï?n or question marks. I assume this is because the TextCodepageConversionBean only works on payloads of type plain/text, while the result of the PayloadZipBean is "application/octet-stream". Is there any way to do this properly? (Question 2)
  4. My workaround is quite simple. I use the PayloadZipBean module in a first sender adapter. Drop this file with a file receiver adapter and then use a second file sender adapter with normal FCC with the Encoding set to ISO-8859-1. This works fine - special characters are read correctly. However, I would prefer doing it all in one sender adapter.

If anyone has any answer to my questions or is maybe doing something similar and has questions, please feel free to answer my post! Also thanks to Stefan Grube for his great post working-with-the-payloadzipbean-module-of-the-xi-adapter-framework.

My regards,

Aerv

0 Likes
View Entire Topic
Former Member
0 Likes

Hi,

1: You are right, gzip is not supported by this bean, so switching to zip was a good decision.

2: Did you try using the following attribute of MessageTransformBean:

Transform.ContentType     text/xml;charset=iso-8859-1

It should help you make PI understand the input as iso-encoded. Special characters should be converted to unicode properly in this case, for further PI processing.

Regards,

Greg

Former Member
0 Likes

Hi Greg,

Thanks for your feedback. I have already tried using the Transform.ContentType set to iso-8859-1, as well as the xml.conversion parameter. However, I still had the same issue when it comes to the special characters (è, é, ...). They arrive in the integration engine like this: � - indicating a missing character.

Regards,

Aerv

Former Member
0 Likes

Dear Aerv,

Just a few more ideas:

- Did you use Transform.ContentType = iso-8859-1, or the whole value that I mentioned? Most probably it does make a difference.

- You could try using Transform.ContentType = text/xml;charset=utf-8. I have no idea why whould it work, but it seems worth trying .

- Are you sure your file is ISO-8859-1 encoded? You can try experimenting with this online tool to confirm that: http://kanjidict.stc.cx/recode.php

Regards,

Greg