on 08-20-2013 2:19 PM
Hi,
I am getting a soap response from webservice where one particular field will be encoded in base64 format.
While mapping I would like to decode this into binary format.
Please advise the procedures.
Regards
Anandh
Hi Anandha,
If you are using the sap util libraries i.e. aii_utilxi_misc.jar - import this in imported archive - import/mention this in the Archives Used tab in the screenshot below. In the Import Instructions mention - com.sap.aii.utilxi.base64.api.Base64 and create a udf as shown below (add exception handling).
This udf can then be used in your mapping for decoding :
If you want to use apache libraries - Go to the functions tab and add the import - org.apache.commons.codec.binary.Base64.
Create a udf in similar lines - where encoded is the input field value :
byte[] decoded = Base64.decodeBase64(encoded);
String decodedout = String(decoded);
return decodedout;
Regards
Subhro
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anandh,
You need to implement a UDF or Java-Mapping to do the decoding. Please search on SDN, you will find some discussions.
Best Regards
H.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.