on 09-18-2014 3:18 PM
Hi Experts
I have a requirement to read an image file from folder through file adapter, then converting it to base64 string and passing this encoded string inside a field in target mapping.
Could you please help/suggest possible ways?
Hi Vishal,
Option1: You can follow Hareesh's solution. However, I recommend to use SAP's Base64 inbuilt class instead of 3rd party base64 implementation class. Use com.sap.aii.utilxi.base64.api.Base64 class which is available in com.sap.aii.utilxi.core.jar file
You can download this jar file from XI system using browser
http://<xiserver>:<port>/rep/repository/com.sap.aii.utilxi.core.jar
Option2: Create a java mapping using SAP's base64 class and then formulate target message using normal java string api (or) SAX/DOM api
Best Regards,
Praveen Gujjeti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
May be read the file as an attachment(additional files) and during the mapping and write a UDF to read the image file and translate into BASE64 ecnoded string.
To read the attachments within mapping:
To convert into base64 string using Apace IO Utils.
How to convert Image to String and String to Image in Java? - myjeeva.com
If you can't read the file as attachment go for the java mapping and handle everything there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.