I have done the Graphical Mapping - First Mapping - IDOC Invoic02 to target structure and this entire payload need to convert base64encode and send in a string filed of Second Mapping - here target structure of API call. I have used Return as xml option in Second mapping source field and convert Base64 using UDF but now i need to change XML encoding UTF-8 to ISO-8859-15 before convert the Base64 format. How I can achieve this requirement.
Please help me on this.
Regards,
Anil Kumar
Request clarification before answering.
Anil,
you might try using adding this xslt mapping as a step of your operation mapping:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output encoding="ISO-8859-15"/>
<xsl:template match="/">
<xsl:copy-of select="*"/>
</xsl:template>
</xsl:stylesheet>
and afterwards convert to base 64 - you might find this blog post by Eng Swee Yeoh useful:
https://blogs.sap.com/2015/05/19/base64encodeconverter-base64-encoding-made-easy/
Please let me know if this helped.
Regards.
Michal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! its worked.
Dear Michal, Thank you for your message. I am working on Finland's finvoice30 e-invoice integration with service providers. I am calling an API post method to send IDOC to Fiinovice30 converted XML in soap request - string field as Base64format. they will accept the XML only encoding ISO-8859-15. That is the reason I need to convert it before covert basee64format. how can I achieve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
I agree with Michal's question.
But if you're sure you need it - you could try something like:
String isoString = new String(utfString.getBytes("UTF-8"), "ISO-8859-15");Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 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.