on 05-30-2013 3:52 PM
My scenario is Mail (with attachment - text file) > PI > XML File. I'm using PayloadSwapBean to read the attachment and convert the text into xml. I want to know will it convert the text file into xml or I need to put some extra effort? I checked these blogs:
http://scn.sap.com/people/gaurav.agarwal11/blog/2012/04/12/handling-attachments-in-mail-to-file-scen...
&
http://wiki.sdn.sap.com/wiki/display/XI/Step+by+Step+Mail+To+File+Scenario
Please suggest. Thank you so much
Hi Gopal,
PayloadSwapBean just replace the attachment of the email to a XI payload message. So by default the attachment needs to be a XML for further processing.
You can try to use MessageTransformBean after PayloadSwapBean in Mail Communication Channel - Module and try to convert the text to xml.
If you dont achieve with this, then you need to go for either Custom Adapter Module development or Java Mapping.
Regards,
Nabendu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much to all of you for your time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PayloadSwapBean+MessageTransformBean worked.. but now content conversion is not working properly. I want to ignore key field.. for that I'm using xml.HEADER1.keyFieldInStructure = ignore. But its not working. Any suggestion. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You might want to check this snippet code for converting text format to XML in java
http://stackoverflow.com/questions/9467208/convert-text-file-to-xml-in-java
Once you are done, then rest will be same as you identified.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gopal,
The payload swap bean will just swap the attachment to the Payload. if the attachment is text, the payload will be text and if it is XML, the payload will be XML. To convert Text to XML, you will need to do Java mapping based on the format of text data.
Hope it helps.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
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.