on ‎2012 May 22 9:19 PM
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:
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
Request clarification before answering.
The TextCodepageConversionBean does not work properly, when the ContentType of the source is not known.
As work around you can set the ContentType with the MessageTransformBean. For this purpose you have to put the MessageTransformbean twice in the module chain.
The parameters for the first MessageTransformBean would be:
Transform.ContentType text/plain;charset=iso-8859-1
The second appearance of the MessageTransformBean does the conversion, as you have already set.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stefan,
Thanks a lot. Inserting a MessageTransformBean prior to the Conversion MessageTransformBean with the parameter Transform.ContentType set to text/plain;charset=iso-8859-1 indeed does the trick. For other people doing this, make sure that your second MessageTransformBean (the conversion one) still contains the Transform.ContentType parameter, this time set to text/xml;charset=utf-8.
Thanks all for your assistance!
Hi Iqbal,
This should do the trick:
However, if you are working with an attachment, then I believe you might have to use the PayloadSwapBean:
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/content.htm
That should allow you to swap your attachment with your main payload and then do the unzip. Because as you can see in the documentation of PayloadZipBean:
Specify the processing mode:
This will only decompress the main payload.
Regards,
Aerv
Hi Aerv,
Thank you so much for your reply.
Basically, I have an Email Attachment to iDoc scenario but I am struggling to read the special character in the email attachment.
XML Contains this
<Eisenhüttenstr. 99>
When PI reads the email it will change the character to
<Eisenhüttenstr. 99>
I can see 2 payload in ABAP Stack
MailMessage (text/xml;charset="utf-8")
MailAttachment-1 (application/octet-stream;name="file1")
Is there anyway I can change the MailAttachment-1 (application/octet-stream;name="file") to MailAttachment-1 (text/xml;charset="utf-8")
I have tried MessageTransformBean but it didn't change the MailAttachment encoding.
Adapter Module
localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean contentType
contentType Transform.ContentType text/xml;charset="utf-8"
Thanks,
Iqbal
I believe you will have to use the PayloadSwapBean first, then afterwards you can use the MessageTransformBean to change it to UTF-8. But I have not used the PayloadSwapBean yet, so you might have to do some research:
That one seems to have a topic on it.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 5 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.