on 01-17-2008 2:32 PM
Hi,
We have a Java Proxy -> XI -> JDBC scenario. Since we are working with some special characters, we need to specify the XML encoding in Java Proxy to "UTF-8".
Any idea how to achieve this in Java Proxy.
Regards,
Anurag Mahendru.
You could try to use the wrapped method.
Your xml would be something like:
> <my_message>
> <xml><![CDATA[<?xml version='1.0'
> encoding='UTF-8'?><data><field>1234</field></data>]]>
> </xml>
> </my_message>
To set the encoding for you XML (to be treated as string in your code), just use something like:
> TransformerFactory tf = TransformerFactory.newInstance();
> Transformer trans = tf.newTransformer();
> trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
> trans.transform(new DOMSource(this.getDataXML()), new StreamResult(out));
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The JPR does not set the encoding of the XML explizit, but it is always UTF-8.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use encoding for your input structure as ISO-8859-1 instead
of UTF-8
How To Work with Character Encodings in Process Integration
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually while using the Java Proxies, the XML message formed at XI (Inbound Message) has no encoding specified. In JPF document the XML encoding not specified.
So i was looking for some way in which i can set the encoding in the incoming JPF Document by making some settings to JPR or in the Java Proxy calling code.
Regards,
Anurag Mahendru
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.