Skip to Content
author's profile photo Former Member
Former Member

Setting Encoding in Client Java Proxy


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.


Anurag Mahendru.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 17, 2008 at 02:36 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.


      Anurag Mahendru

  • Posted on Jan 17, 2008 at 07:30 PM

    The JPR does not set the encoding of the XML explizit, but it is always UTF-8.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 17, 2008 at 07:47 PM

    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));



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.