on 09-10-2012 5:17 PM
Hi Experts,
I am doing RFC to WebService synchronous scenario. As part of this, I need to send entire input xml file(RFC) as string ( webservice message field) to Webservice.
I am using PI 7.0..so options are Java Mapping and XSLT. I have created the java mapping and its working
Problem : But java mapping replacing french characters as below.
French : Chargé à: MONTRÉAL
Replacing as : Chargé à : MONTRÉAL
So other alternative is going to XSLT mapping. Could you please provide XSLT code for the same.
Input xml:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<A>
Chargé à: MONTRÉAL
</A>
</root>
expected output:
<?xml version="1.0" encoding="UTF-8"?>
<Title>
<?xml version="1.0" encoding="UTF-8"?><root><A> Chargé à: MONTRÉAL</A></root>
</Title>
Note: Above mentioned xml is just for an example and actual xml contains around 100 fields
Message was edited by: Moderator - Please do not use words like 'Urgent'
Hi,
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="ISO-8859-1"/>
<xsl:template match="/">
<Title>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="*"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</Title>
</xsl:template>
</xsl:stylesheet>
I think you need latin code instead of UTF-8
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks for your prompt response. Udo's xslt mapping is super and it solved my problem.and yes, as you all mentioned the issue is with encoding. I have used ISO-8859-1 and now french characters showing correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the folllowing link to conver the special characters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krish,
Can you post the java mapping code you wrote? I think the encoding scheme needs to be corrected while producing the output.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is nothing to do with Java mapping or XSLT mapping. You would have to use the correct code page and encoding while generating your target XML.
VJ
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 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.