Encoding in XML

Hi,
I am using the C++ XML parser with solaris and oracle 8.1.6. I have set my ORACLE_HOME pointed to my oracle installtion and do have all the NLS files. I dont have any problem with ASCII and UTF-8 data. But i encounter some problem when parsing ISO-8859-1 data. I get 217 error
Can you please help me out.
Jayashree.
null

I was asking myself the same question, and found this solution :
On the report's properties in Reports Builder, set the XML Prolog Type to "Text" and modify the "XML Prolog Value" to include the encoding.
If you do not wish to hard-code the encoding, you can define an "ENCODING" user parameter for your report, and set the prolog value to :
<?xml version="1.0" encoding="&ENCODING" ?>

Similar Messages

  • Image encoding in XML report definition

    For a number of reports I have the Report definition in XML-format. These files contain embedded images.
    How do I extract image-files from the xml's. It doesn't look like the strings for the images are not base16 or base64 encoded?

    Are you working with something like this?
    <?xml version="1.0" encoding="WINDOWS-1252" ?>
    <report name="MODULE1" DTDVersion="9.0.2.0.10">
      <xmlSettings xmlTag="MODULE1" xmlPrologType="text">
      <![CDATA[<?xml version="1.0" encoding="&Encoding"?>]]>
      </xmlSettings>
      <data>
        <systemParameter name="MODE" initialValue="Default"/>
        <systemParameter name="ORIENTATION" initialValue="Default"/>
      </data>
      <layout>
      <section name="main">
        <body>
          <image name="B_1">
            <geometryInfo x="0.00000" y="0.00000" width="8.31250" height="6.25000"
            />
            <visualSettings fillPattern="transparent" fillBackgroundColor="black"
             linePattern="transparent" lineBackgroundColor="black"/>
            <points>
              <point x="0.00000" y="0.00000"/>
              <point x="8.31250" y="6.25000"/>
              <point x="0.00000" y="0.00000"/>
              <point x="8.31250" y="6.25000"/>
            </points>
            <binaryData encoding="hexidecimal" dataId="image.B_1">
    FF8DFF0E 0001A464 94640010 10100006 00060000 FFBD0048 0001B0C0 E0C0A001
    E0D0E021 11013181 82A18161 61811332 52D182A3 33D3C393 33837304 84C5E404
    44755473 8305D615 75F52676 8676E3D4 17970746 87C55676 36101121 21815181
    F2A1A1F2 36248324 36363636 36363636 36363636 36363636 36363636 36363636
    36363636 36363636 36363636 36363636 36363636 36363636 3636FF4C 102A0000
    D29681A8 4EB94557 F3D8D588 912F1FCE A2478278 4E157FE8 D3B2F257 A1906D14
    A809D102 9F646EFF 007CA66A B08C98EF 2E5344BB 4978EEAD 55093F75 6A4E8D29
    345ECCA0 4F537A2C 9CB424CB 8DDE0D7D 53D4D002 D3E32E6D 1942F70F 5D29740C
    7CF15A56 1A469E72 F449A09D 918DE7CF 5F9F877A 17106FEF 474C484E 6F41C067
    0D1338AF 1D06311A 4E6608F0 F4C40540 859FBFE7 579924E1 495C31FF 9D
            </binaryData>
          </image>
        </body>
      </section>
      </layout>
      <webSource>
      <![CDATA[<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
    <%@ page language="java" import="java.io.*" errorPage="/rwerror.jsp" session="false" %>
    <%@ page contentType="text/html;charset=ISO-8859-1" %>
    <!--
    <rw:report id="report">
    <rw:objects id="objects">
    </rw:objects>
    -->
    <html>
    <head>
    <meta name="GENERATOR" content="Oracle 9i Reports Developer"/>
    <title> Your Title </title>
    <rw:style id="yourStyle">
       <!-- Report Wizard inserts style link clause here -->
    </rw:style>
    </head>
    <body>
    <rw:dataArea id="yourDataArea">
       <!-- Report Wizard inserts the default jsp here -->
    </rw:dataArea>
    </body>
    </html>
    <!--
    </rw:report>
    -->
    ]]>
      </webSource>
      <reportPrivate versionFlags2="0" templateName="rwbeige"/>
      <reportWebSettings>
      <![CDATA[]]>
      </reportWebSettings>
    </report>Image data is encoded in hexadecimal format (base16) but the hex digits are reversed compared to the original byte sequence.
    For example, the first eight bytes in the source are :
    FFD8FFE0 00104A46but appears as FF8DFF0E 0001A464 in the XML file.
    You'll need a small program to read the file, extract the hex binary stream, process it and write back the data to a file.
    Example in PL/SQL (tested on db version 11.2.0.2) :
    DECLARE
    fid     utl_file.file_type;
    len     PLS_INTEGER := 1024;
    buf     RAW(512);
    module_name VARCHAR2(260) := 'MODULE1';
    dir_name    VARCHAR2(30) := 'TEST_DIR';
    BEGIN
      for r in (
        /* extract all image elements */
        select img_name
             , regexp_replace(img_data, '\s+') as img_data
        from xmltable('//body/image'
              passing xmltype(bfilename(dir_name, module_name||'.xml'), nls_charset_id('WE8MSWIN1252'))
              columns img_name varchar2(30) path '@name'
                    , img_data clob         path 'binaryData'
      loop
        /* output file */
        fid := utl_file.fopen(dir_name, module_name || '_' || r.img_name || '.jpg', 'wb', 32767);
        for i in 0..trunc((dbms_lob.getlength(r.img_data) - 1 )/len)
        loop
          /* read 1k of hex data and convert to binary */
          buf := hextoraw(
                   regexp_replace(
                     dbms_lob.substr(r.img_data, len, i*len + 1)
                   , '\2\1'
          utl_file.put_raw(fid, buf);
        end loop;
        utl_file.fclose(fid);
      end loop;
    END;
    /

  • Set encoding in xml document

    Hi, I create org.dom4j.Document in java and I need set encoding to
    windows-1250, but I don't know how it do. I have always default encoding UTF-8.
    Document document = DocumentHelper.createDocument();
    Element zakazky = document.addElement(ZAKAZKY);
    <?xml version="1.0" encoding="UTF-8"?>
    <zakazky><zakazka><znacka_form>40708050001</znacka_form>......
    Thanks.

    This reply is a bit late (better late than never), but if anyone is stuck on this issue hopefully you can find this answer:
    You set the encoding when you use the Transformer class (when you output the XML)
    File file = new File("file.xml");
    OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream(file), "windows-1250"); //I don't think you need to set it here, but you can if you like.
    TransformerFactory tf = TransformerFactory.newInstance();
    Transformer output = tf.newTransformer();
    StreamResult sr = new StreamResult(osw);
    output.setOutputProperty("encoding", "windows-1250");
    output.transform(ds, sr);By the way why do people say that Document has a method called getEncoding (and hence setEncoding) when it clearly doesn't - read your documents first before you start talking utter nonsense.
    Benjamin Black

  • Problem with base64 encoding an xml file with accented characters

    Oracle 10.2.0.1.0 Enterprise Edition running under windows 2003 server
    DB Characterset UTF-8
    I have a routine which takes an xml file and base64 encodes it, and the base64encoded text is stored in a clob column of a table.
    The xml file is stored in UTF-8 format.
    The routine works correctly, except when there are accented characters.
    I am using dbms_lob.loadclobfrom file to load the file.
    DBMS_LOB.OPEN(src_clob, DBMS_LOB.LOB_READONLY);
        DBMS_LOB.LoadCLOBFromFile(
              DEST_LOB     => dest_clob
            , SRC_BFILE    => src_clob
            , AMOUNT       => DBMS_LOB.GETLENGTH(src_clob)
            , DEST_OFFSET  => dst_offset
            , SRC_OFFSET   => src_offset
            , BFILE_CSID   =>dbms_lob.default_csid
            , LANG_CONTEXT => lang_ctx
            , WARNING      => warning
        DBMS_LOB.CLOSE(src_clob);base 64 encoded xml with accented character -- incorrect
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxncDpBcHBs
    aWNhdGlvblByb2ZpbGUgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAx
    L1hNTFNjaGVtYS1pbnN0YW5jZSINCiAgICB4c2k6c2NoZW1hTG9jYXRpb249Imh0
    dHA6Ly9uYW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9zeXN0ZW1zLXByb2Zp
    bGVzLzEuMS4wIGh0dHA6Ly9uYW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9z
    eXN0ZW1zLXByb2ZpbGVzLzEuMS4wL0dQLnN5c3RlbXMucHJvZmlsZXMuMS4xLjAu
    QXBwbGljYXRpb25Qcm9maWxlLnhzZCINCiAgICB4bWxuczpncD0iaHR0cDovL25h
    bWVzcGFjZXMuZ2xvYmFscGxhdGZvcm0ub3JnL3N5c3RlbXMtcHJvZmlsZXMvMS4x
    LjAiDQogICAgVW5pcXVlSUQ9Ik1FIiBQcm9maWxlVmVyc2lvbj0iMS4xLjAiIEVy
    cmF0YVZlcnNpb249IjAiPg0KICAgIDxncDpEZXNjcmlwdGlvbj5Gb3J1bSBUZXN0
    PC9ncDpEZXNjcmlwdGlvbj4NCiAgICA8Z3A6RGF0YUVsZW1lbnQgTmFtZT0iw6Fj
    Y2VudCIgRXh0ZXJuYWw9InRydWUiIFR5cGU9IkJ5dGVTdHJpbmciIEVuY29kaW5n
    PSJIRVgiIEZpeGVkTGVuZ3RoPSJmYWxzZSIgTGVuZ3RoPSIxNiIgUmVhZFdyaXRl
    PSJ0cnVlIiBVcGRhdGU9InRydWUiIE9wdGlvbmFsPSJ0cnVlIiAvPiAgICANCjwv
    Z3A6QXBwbGljYXRpb25Qcm9maWxlPg0Kbase 64 encoded xml without accented character -- correct
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjxncDpBcHBs
    aWNhdGlvblByb2ZpbGUgeG1sbnM6eHNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAx
    L1hNTFNjaGVtYS1pbnN0YW5jZSINCiAgICB4c2k6c2NoZW1hTG9jYXRpb249Imh0
    dHA6Ly9uYW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9zeXN0ZW1zLXByb2Zp
    bGVzLzEuMS4wIGh0dHA6Ly9uYW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9z
    eXN0ZW1zLXByb2ZpbGVzLzEuMS4wL0dQLnN5c3RlbXMucHJvZmlsZXMuMS4xLjAu
    QXBwbGljYXRpb25Qcm9maWxlLnhzZCINCiAgICB4bWxuczpncD0iaHR0cDovL25h
    bWVzcGFjZXMuZ2xvYmFscGxhdGZvcm0ub3JnL3N5c3RlbXMtcHJvZmlsZXMvMS4x
    LjAiDQogICAgVW5pcXVlSUQ9Ik1FIiBQcm9maWxlVmVyc2lvbj0iMS4xLjAiIEVy
    cmF0YVZlcnNpb249IjAiPg0KICAgIDxncDpEZXNjcmlwdGlvbj5Gb3J1bSBUZXN0
    PC9ncDpEZXNjcmlwdGlvbj4NCiAgICA8Z3A6RGF0YUVsZW1lbnQgTmFtZT0iYWNj
    ZW50IiBFeHRlcm5hbD0idHJ1ZSIgVHlwZT0iQnl0ZVN0cmluZyIgRW5jb2Rpbmc9
    IkhFWCIgRml4ZWRMZW5ndGg9ImZhbHNlIiBMZW5ndGg9IjE2IiBSZWFkV3JpdGU9
    InRydWUiIFVwZGF0ZT0idHJ1ZSIgT3B0aW9uYWw9InRydWUiIC8+ICAgIA0KPC9n
    cDpBcHBsaWNhdGlvblByb2ZpbGU+DQo=the xml file in use is
    <?xml version="1.0" encoding="UTF-8"?>
    <gp:ApplicationProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://namespaces.globalplatform.org/systems-profiles/1.1.0 http://namespaces.globalplatform.org/systems-profiles/1.1.0/GP.systems.profiles.1.1.0.ApplicationProfile.xsd"
        xmlns:gp="http://namespaces.globalplatform.org/systems-profiles/1.1.0"
        UniqueID="ME" ProfileVersion="1.1.0" ErrataVersion="0">
        <gp:Description>Forum Test</gp:Description>
        <gp:DataElement Name="áccent" External="true" Type="ByteString" Encoding="HEX" FixedLength="false" Length="16" ReadWrite="true" Update="true" Optional="true" />   
    </gp:ApplicationProfile>The file is being loaded from a windows xp professional 32 bit system.
    If I just convert the xml text of the file using
    select utl_raw.cast_to_varchar2(
    utl_encode.base64_encode(
    utl_raw.cast_to_raw(
    '<?xml version="1.0" encoding="UTF-8"?>
    <gp:ApplicationProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://namespaces.globalplatform.org/systems-profiles/1.1.0 http://namespaces.globalplatform.org/systems-profiles/1.1.0/GP.systems.profiles.1.1.0.ApplicationProfile.xsd"
        xmlns:gp="http://namespaces.globalplatform.org/systems-profiles/1.1.0"
        UniqueID="ME" ProfileVersion="1.1.0" ErrataVersion="0">
        <gp:Description>Forum Test</gp:Description>
        <gp:DataElement Name="áccent" External="true" Type="ByteString" Encoding="HEX" FixedLength="false" Length="16" ReadWrite="true" Update="true" Optional="true" />   
    </gp:applicationprofile>'
    ))) from dual;I get the following
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGdwOkFwcGxp
    Y2F0aW9uUHJvZmlsZSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEv
    WE1MU2NoZW1hLWluc3RhbmNlIgogICAgeHNpOnNjaGVtYUxvY2F0aW9uPSJodHRw
    Oi8vbmFtZXNwYWNlcy5nbG9iYWxwbGF0Zm9ybS5vcmcvc3lzdGVtcy1wcm9maWxl
    cy8xLjEuMCBodHRwOi8vbmFtZXNwYWNlcy5nbG9iYWxwbGF0Zm9ybS5vcmcvc3lz
    dGVtcy1wcm9maWxlcy8xLjEuMC9HUC5zeXN0ZW1zLnByb2ZpbGVzLjEuMS4wLkFw
    cGxpY2F0aW9uUHJvZmlsZS54c2QiCiAgICB4bWxuczpncD0iaHR0cDovL25hbWVz
    cGFjZXMuZ2xvYmFscGxhdGZvcm0ub3JnL3N5c3RlbXMtcHJvZmlsZXMvMS4xLjAi
    CiAgICBVbmlxdWVJRD0iTUUiIFByb2ZpbGVWZXJzaW9uPSIxLjEuMCIgRXJyYXRh
    VmVyc2lvbj0iMCI+CiAgICA8Z3A6RGVzY3JpcHRpb24+Rm9ydW0gVGVzdDwvZ3A6
    RGVzY3JpcHRpb24+CiAgICA8Z3A6RGF0YUVsZW1lbnQgTmFtZT0iw6FjY2VudCIg
    RXh0ZXJuYWw9InRydWUiIFR5cGU9IkJ5dGVTdHJpbmciIEVuY29kaW5nPSJIRVgi
    IEZpeGVkTGVuZ3RoPSJmYWxzZSIgTGVuZ3RoPSIxNiIgUmVhZFdyaXRlPSJ0cnVl
    IiBVcGRhdGU9InRydWUiIE9wdGlvbmFsPSJ0cnVlIiAvPiAgICAKPC9ncDphcHBs
    aWNhdGlvbnByb2ZpbGU+Edited by: Keith Jamieson on Jul 13, 2012 9:59 AM
    added code tag for last base64 encoded object

    Not sure if utl_i18n is already there in version prior to 11.2.0.2.
    But on above mentioned version I can do the simplified method
    SQL> SELECT utl_i18n.raw_to_char (
             utl_encode.base64_encode (
               xmltype (
                 '<?xml version="1.0" encoding="UTF-8"?>
    <gp:ApplicationProfile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://namespaces.globalplatform.org/systems-profiles/1.1.0 http://namespaces.globalplatform.org/systems-profiles/1.1.0/GP.systems.profiles.1.1.0.ApplicationProfile.xsd"
        xmlns:gp="http://namespaces.globalplatform.org/systems-profiles/1.1.0"
        UniqueID="ME" ProfileVersion="1.1.0" ErrataVersion="0">
        <gp:Description>Forum Test</gp:Description>
        <gp:DataElement Name="áccent" External="true" Type="ByteString" Encoding="HEX" FixedLength="false" Length="16" ReadWrite="true" Update="true" Optional="true" />   
    </gp:ApplicationProfile>').getblobval (
                 NLS_CHARSET_ID ('utf8'))),
             'utf8')
             x
      FROM DUAL
    X                                                                                                                                                    
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGdwOkFwcGxp                                                                                     
    Y2F0aW9uUHJvZmlsZSB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEv                                                                                     
    WE1MU2NoZW1hLWluc3RhbmNlIiB4c2k6c2NoZW1hTG9jYXRpb249Imh0dHA6Ly9u                                                                                     
    YW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9zeXN0ZW1zLXByb2ZpbGVzLzEu                                                                                     
    MS4wIGh0dHA6Ly9uYW1lc3BhY2VzLmdsb2JhbHBsYXRmb3JtLm9yZy9zeXN0ZW1z                                                                                     
    LXByb2ZpbGVzLzEuMS4wL0dQLnN5c3RlbXMucHJvZmlsZXMuMS4xLjAuQXBwbGlj                                                                                     
    YXRpb25Qcm9maWxlLnhzZCIgeG1sbnM6Z3A9Imh0dHA6Ly9uYW1lc3BhY2VzLmds                                                                                     
    b2JhbHBsYXRmb3JtLm9yZy9zeXN0ZW1zLXByb2ZpbGVzLzEuMS4wIiBVbmlxdWVJ                                                                                     
    RD0iTUUiIFByb2ZpbGVWZXJzaW9uPSIxLjEuMCIgRXJyYXRhVmVyc2lvbj0iMCI+                                                                                     
    CiAgPGdwOkRlc2NyaXB0aW9uPkZvcnVtIFRlc3Q8L2dwOkRlc2NyaXB0aW9uPgog                                                                                     
    IDxncDpEYXRhRWxlbWVudCBOYW1lPSLDoWNjZW50IiBFeHRlcm5hbD0idHJ1ZSIg                                                                                     
    VHlwZT0iQnl0ZVN0cmluZyIgRW5jb2Rpbmc9IkhFWCIgRml4ZWRMZW5ndGg9ImZh                                                                                     
    bHNlIiBMZW5ndGg9IjE2IiBSZWFkV3JpdGU9InRydWUiIFVwZGF0ZT0idHJ1ZSIg                                                                                     
    T3B0aW9uYWw9InRydWUiLz4KPC9ncDpBcHBsaWNhdGlvblByb2ZpbGU+Cg==                                                                                         
    1 row selected.which encodes and decodes properly on my system even with accented characters.

  • How to specify page encoding for XML reports.

    Hi,
    Environment: Apps:11.5.10, Oracle Reports: 10g
    I'm trying to generate XML tags by using a "rdf" report (10g).
    Initially I generated the XML tags before moving the report to server. In the output file I got
    <?xml version="1.0" encoding="WINDOWS-1252"?>
    Then I moved the report to server and made the concurrent program output to XML.
    In the concurrent program output the tag is
    <?xml version="1.0" encoding="&Encoding"?>
    The output shows error
    ===============
    XML Parsing Error: XML declaration not well-formed
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    <?xml version="1.0" encoding="&Encoding"?>
    Its clear that there is something wrong with page encoding format which has to get assigned while run time. But its not happening so.
    How to specify the page encoding format?
    Any help would be appreciated.
    Thank you
    BKR.
    Edited by: BalaKrishna Reddy Avuthu on Aug 14, 2009 2:00 PM

    Remove the encoding so it says:
    <?xml version="1.0"?>
    Also, you will get a similar error if your xml tags for fields contain any special characters like & or #.

  • Problem with encoding of xml document

    while parsing an xml document with SAX parser, i found that encoding of the xml document received as input stream is "ISO-8859-1" . After parsing certain fields has to be stored in the mysql table where table character set is "utf8" . Now what i found that ceratin characters in the original XML document are stored as question mark (?) in the database.
    1. I am using mysql 4.1.7 with system variable character_set_database as "utf8". So all my tables have charset as "utf8".
    2. I am parsing some xml file as inputsream using SAX parser api (org.apache.xerces.parsers.SAXParser ) with encoding "iso-8859-1". After parsing certain fields have to be stored in mysql database.
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - � and the problem is that words like can�t are shown as can?t by database.
    4. I notiicied that parsing is going on well and character code is 146 while parsing. But when i reterive it from the database using jdbc it shows character code as 63.
    5. I am using jdbc to prepared statement to insert parsed xml in the database. It seems that while inserting some problem occurs what is this i don't know.
    6. I tried to convert iso-8859-1 to utf-8 before storing into database, by using
    utfString = new String(isoString.getBytes("ISO-8859-1"),"UTF-8");
    But still when i retreive it from the databse it shows caharcter code as 63.
    7. I also tried to retrieve it using , description = new String(rs.getBytes(1),"UTF-8");
    But it also shows that description contains character with code 63 instead of 146 and it is also showing can�t as can?t
    help me out where is the problem in parsing or while storing and retreiving from database. Sorry for any spelling mistakes if any.

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - &#146; and the problem is that words like can&#146;t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

  • Support on 'Base64 encoding in XML gateway Web service SOAP content'

    Hi Experts,
    IHAC who's requirement is as follows:
    They are currently using Web service protocol to send order information from Oracle Applications to their trading partner.
    But need to encode the payload in base64 encoding in the SOAP request.
    Further details:
    =====================================================================
    Current SOAP request is,
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bac="http://backend.ws.gtas.gridnode.com">
    <soapenv:Header/>
    <soapenv:Body>
    <bac:backendImport4>
    <bac:username>?</bac:username>
    <bac:password>?</bac:password>
    <bac:recipient>?</bac:recipient>
    <bac:contentFileName>?</bac:contentFileName>
    <bac:content>
    <EMPLOYEE>
    <EMPLOYEE_DATA>
    <EMAIL_ADDRESS/>
    <EMPLOYEE_ID>81</EMPLOYEE_ID>
    <EMPLOYEE_NUM>2</EMPLOYEE_NUM>
    <FIRST_NAME/>
    <FULL_NAME>Eddi.S,</FULL_NAME>
    <LAST_NAME>Eddi.S</LAST_NAME>
    <MIDDLE_NAME/>
    </EMPLOYEE_DATA>
    </EMPLOYEE>
    </bac:content>
    <bac:docType>?</bac:docType>
    </bac:backendImport4>
    </soapenv:Body>
    </soapenv:Envelope>
    Required SOAP request with base64 encoding is:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bac="http://backend.ws.gtas.gridnode.com">
    <soapenv:Header/>
    <soapenv:Body>
    <bac:backendImport4>
    <bac:username>?</bac:username>
    <bac:password>?</bac:password>
    <bac:recipient>?</bac:recipient>
    <bac:contentFileName>?</bac:contentFileName>
    <bac:content>
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=
    </bac:content>
    <bac:docType>?</bac:docType>
    </bac:backendImport4>
    </soapenv:Body>
    </soapenv:Envelope>
    The issue in question is the content within the element <bac:content>.
    Base64 encoding of the payload
    <EMPLOYEE>
    <EMPLOYEE_DATA>
    <EMAIL_ADDRESS/>
    <EMPLOYEE_ID>81</EMPLOYEE_ID>
    <EMPLOYEE_NUM>2</EMPLOYEE_NUM>
    <FIRST_NAME/>
    <FULL_NAME>Eddi.S,</FULL_NAME>
    <LAST_NAME>Eddi.S</LAST_NAME>
    <MIDDLE_NAME/>
    </EMPLOYEE_DATA>
    </EMPLOYEE>
    is
    PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=
    ========================================================================
    Is there a way in XML gateway to encode the payload automatically to base64 encoding so that it can accommodate the unicode
    Is there any way to encode the order information from EBS tables to base64 format in the outbound SOAP request ? Is this supported . If yes, how.?
    Does this involve customization. Is it possible to use encoder/decoder provided in sites such as XSL on top of XML : http://gandhimukul.tripod.com/xslt/base64-xslt.html
    Basically, They are trying to use XML Gateway to send and receive messages to a Trading Partner via SOAP. The issues is
    1. Outbound: The TP web service can only receive xml content that is encoded in base 64 binary format. How do we configure to encode content using base64
    2. Inbound: They want to receive messages using the SOAP architecture into XML gateway.
    Please let us know if you have any detailed configuration document for this purpose. Please advise and share relevant details.
    regards,
    Ajith

    Hi Gurvinder,
    Thanks for looking into this. Just to clarify again.
    example XML content:
    <?xml version="1.0" encoding="UTF-8" standalone='no'?>
    <!DOCTYPE EMPLOYEE>
    <!-- Oracle eXtensible Markup Language Gateway Server -->
    <EMPLOYEE>
    <EMPLOYEE_DATA>
    <EMAIL_ADDRESS/>
    <EMPLOYEE_ID>81</EMPLOYEE_ID>
    <EMPLOYEE_NUM>2</EMPLOYEE_NUM>
    <FIRST_NAME/>
    <FULL_NAME>Eddi.S,</FULL_NAME>
    <LAST_NAME>Eddi.S</LAST_NAME>
    <MIDDLE_NAME/>
    </EMPLOYEE_DATA>
    </EMPLOYEE>
    Sample Soap message that needs to be sent to our service provider is as follows
    <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
    - <soapenv:Body>
    - <ns5:backendImport5 xmlns:ns5="http://backend.ws.gtas.gridnode.com">
    <ns5:username>admin</ns5:username>
    <ns5:password>admin1</ns5:password>
    <ns5:recipient>GT424</ns5:recipient>
    <ns5:contentFileName>cabotTest.xml</ns5:contentFileName>
    <ns5:content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=</ns5:content>
    <ns5:docType>3C3RN</ns5:docType>
    </ns5:backendImport5>
    </soapenv:Body>
    </soapenv:Envelope>
    . The xml content provided need to be encoded as base 64 encoding. The following is the equivalent of above xml content.
    <ns5:content>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9J25vJz8+DQo8IURPQ1RZUEUgRU1QTE9ZRUU+DQo8IS0tIE9yYWNsZSBlWHRlbnNpYmxlIE1hcmt1cCBMYW5ndWFnZSBHYXRld2F5IFNlcnZlciAgLS0+DQo8RU1QTE9ZRUU+DQogIDxFTVBMT1lFRV9EQVRBPg0KICAgIDxFTUFJTF9BRERSRVNTLz4NCiAgICA8RU1QTE9ZRUVfSUQ+ODE8L0VNUExPWUVFX0lEPg0KICAgIDxFTVBMT1lFRV9OVU0+MjwvRU1QTE9ZRUVfTlVNPg0KICAgIDxGSVJTVF9OQU1FLz4NCiAgICA8RlVMTF9OQU1FPkVkZGkuUyw8L0ZVTExfTkFNRT4NCiAgICA8TEFTVF9OQU1FPkVkZGkuUzwvTEFTVF9OQU1FPg0KICAgIDxNSURETEVfTkFNRS8+DQogIDwvRU1QTE9ZRUVfREFUQT4NCjwvRU1QTE9ZRUU+DQo=</ns5:content>
    See that the content is encoded using the base64 format.
    Please help us to know how we can configure XML gateway to achieve this.
    Regards,
    Ajith

  • Character Encoding in XML

    Hello All,
    I am not clear about solving the problem.
    We have a Java application on NT that is supposed to communicate with the same application on MVS mainframe through XML.
    We have a character encoding for these XML commands we send for communication.
    The problem is, on MVS the parser is not understaning the US-ASCII character encoding. And so we are getting the infamous "illegal character error".
    The main frame file.encoding=CP1047 and
    NT's file.encoding = us-ascii.
    Is there any character encoding that is common to these two machines: mainframe and NT.
    IF it is Unicode, what is the correct notation for it.
    Or is there any way for specifying the parsers to which character encoding should be used.
    thanks,
    Sridhar

    On the mainframe end maybe something like-
    FileInputStream fris = new FileInputStream("C:\\whatever.xml");
    InputStreamReader is= new InputStreamReader(fris, "ASCII");//or maybe "us-ascii" "US-ASCII"
    BufferedReader brin = new BufferedReader(is);
    Or give inputstream/buffered reader to whatever application you are using to parse the xml. The input stream reader should allow you to set your encoding even if the system doesnt have the native encoding. Depends though on which/whose jvm using you are using jdk1.2 at least supports following on this page http://as400bks.rochester.ibm.com/pubs/html/as400/v4r4/ic2924/info/java/rzaha/javaapi/intl/encoding.doc.html

  • Can't use UTF-16 encoding with XML Parser for Java v2.

    This is my XML Document:
    <?xml version="1.0" encoding="UTF-16" ?>
    <Content>
    <Title>Documento de Prueba de gestin de contenidos.</Title>
    <Creator>Roberto P     rez Lita</Creator>
    </Content>
    This is the way in which i parse de document:
    DOMParser parser=new DOMParser();
    parser.setPreserveWhitespace(true);
    parser.setErrorStream(System.err);
    parser.setValidationMode(false);
    parser.showWarnings(true);
    parser.parse(
    new FileInputStream(new File("PruebaA3Ingles.xml")));
    I've got this error:
    XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    I am using the XML Parser for Java v2_0_2_5 and I am a little
    confused because the documentation says that the UTF-16 encoding
    is supported in this version of the Parser.
    Does anybody know how can I parse documents containing spanish
    accents?
    Thanks in advance.
    Roberto P     rez.
    null

    Oracle just uploaded a new release of V2 Parser. It should
    support UTF-16.
    Yet, other utilities still have some problems with UTF-16
    encoding. Seems we just
    have to wait this one out.
    BTW, I'm trying to use Japanese. We, also, have some problems
    with JServer.
    Roberto P     rez (guest) wrote:
    : This is my XML Document:
    : <?xml version="1.0" encoding="UTF-16" ?>
    : <Content>
    : <Title>Documento de Prueba de gestin de contenidos.</Title>
    : <Creator>Roberto P     rez Lita</Creator>
    : </Content>
    : This is the way in which i parse de document:
    : DOMParser parser=new DOMParser();
    : parser.setPreserveWhitespace(true);
    : parser.setErrorStream(System.err);
    : parser.setValidationMode(false);
    : parser.showWarnings(true);
    : parser.parse(
    : new FileInputStream(new File("PruebaA3Ingles.xml")));
    : I've got this error:
    : XML-0231 : (Error) Encoding 'UTF-16' is not currently supported.
    : I am using the XML Parser for Java v2_0_2_5 and I am a little
    : confused because the documentation says that the UTF-16
    encoding
    : is supported in this version of the Parser.
    : Does anybody know how can I parse documents containing spanish
    : accents?
    : Thanks in advance.
    : Roberto P     rez.
    null

  • How to change UTF-8 encoding for XML parser (PL/SQL) ?

    Hello,
    I'm trying to parse xml file stored in CLOB.
    p := xmlparser.newParser;
    xmlparser.parseCLOB(p, CLOB_xmlBody);
    Standard PL/SQL parser encoding is UTF-8. But my xml CLOB contain ISO-8859-2 characters.
    Can you advise me, please, how to change encoding for parser?
    Any help would be appreciated.
    null

    Do you documents contain an XML Declaration like this at the top?
    <?xml version="1.0" encoding="ISO-8859-2"?>
    If not, then they need to. The XML 1.0 specification says that if an XML declaration is not present, the processor must default to assume its in UTF-8 encoding.

  • Adding Encoding in XML header without mapping

    Hi Gurus,
    I am stuck in a situation where in a pass through scenario, I need to add encoding type in XML header.
    Below is example -
    Current Situation - <?xml version="1.0"?>
    Expected result -  <?xml version="1.0" encoding="UTF-8"?>
    Can anybody help me in this regard? how to achieve this?
    Regards
    Vidhi S

    Hi Vidhi
    Use it in the below way in the receiver adapter.
    Module name: AF_Modules/XMLAnonymizerBean
    Parameter name: anonymizer.encoding
    This will work. I have tested already.

  • Encoding Type XML Document

    Hi,
    I have an XML document which is essentially data pulled from the craigs list website. It contains alot of Ampersands and pound signs and other stuff which i have been told does not follow the UTF-8 encoding which i put in the tag at the top of the document. Could someone tell me what the correct encoding would be so that i can parse the file using the Java DOM parser without it throwing out errors such as;
    Invalid byte 1 of 1-byte UTF-8 sequence.
    Thanks Alot
    Richard.

    Sounds like you don't know too much about XML and encoding. Try reading this tutorial, it's long but it's thorough:
    [http://skew.org/xml/tutorial/|http://skew.org/xml/tutorial/]
    That should take care of the XML part. Now you need to know the Java part: the simple rule is to not create XML documents if you don't know what encoding they will have. Your best bet is to write them using UTF-8 in the first place. I don't know how you're writing the documents but my bet is you're using plain old Java I/O. In that case use an OutputStreamWriter which specifies UTF-8 for the encoding. Here's a link to the Java I/O tutorial if you don't know how to do that:
    [http://java.sun.com/docs/books/tutorial/essential/io/|http://java.sun.com/docs/books/tutorial/essential/io/]

  • Detection of encoding of XML file with the StAX parser

    Hello!
    I am using the StAX parser to read an XML file which can have different encodings.
    I don't know how to detect the encoding before reading the file.
    This is the way I instantiate the reader now:
    XMLStreamReader xmlr = xmlif.createXMLStreamReader(new InputStreamReader (new FileInputStream(inputfile), "utf-8"));
    Is there any way to make the reader detect the encoding with StAX? Is it possible detect the encoding with SAX or DOM?
    Just paste some piece of code and you will help me a lot!
    Thanks,
    Lara

    XML parsers are supposed to auto-detect the encoding of their inputs. The SAX and DOM parsers built into Java, as well as others like Xerces, do that. I don't know whether your StAX parser does, but it should. There is a standard procedure for determining the encoding that is described in the XML spec.
    However if you have malformed XML that fails to declare its encoding properly, then none of those parsers will be able to fix that problem for you.
    Here's the simplified rule as it applies to most files: if the XML file doesn't have a prolog, or if it's prolog doesn't specify an encoding, the parser will assume the file's encoding is UTF-8. If the XML file does have a prolog that specifies an encoding, the parser will assume that encoding.
    Unfortunately it is common for people to write XML files that don't declare an encoding, but to forget to encode the file in UTF-8. Then you have a file that is actually encoded in (e.g.) Windows-1252, but the parser believes it is UTF-8, and this fails when there are non-ASCII characters in the document.

  • How to set encoding for xml Marshaller?

    Hi,
    I am using SAPXMLToolkit. And I use XMLMarshaller to convert from xml to java classes (jaxb classes). Now when I get some characters like ü, the marshaller gives an error
    com.sap.engine.lib.xml.parser.ParserException: Unsupported character: 69(:main:, row:1, col:323)
         at com.sap.engine.lib.xml.parser.readers.EncodedDataReader.read(EncodedDataReader.java:207)
         at com.sap.engine.lib.xml.parser.readers.EncodedDataReader.read(EncodedDataReader.java:205)
         at com.sap.engine.lib.xml.parser.helpers.AdvancedXMLStreamReader.read(AdvancedXMLStreamReader.java:152)
         at com.sap.engine.lib.xml.parser.XMLParser.scanCharData(XMLParser.java:1896)
         at com.sap.engine.lib.xml.parser.tokenizer.XMLTokenReaderImpl.next(XMLTokenReaderImpl.java:190)
    How do I solve this?? How do I set encoding for the marshaller?
    Regards,
    Guru

    Hi ogre,
    To set the encoding scheme for an XML document, you can use the createProcessingInstruction. Our CVIXML instrument driver (which
    is basically and user-friendly wrapper made around the MSXML interface) uses
    this method to specify the version of the XML document. So, what you could do
    is simply modify our existing CVIXML instrument driver to include the encoding.
    It's actually quite simple to do this.
    First off, open up the cvixml.c file
    located in the <CVI>\toolslib\toolbox directory in CVI. Then change the
    value of the constant XML_PROC_INSTR_DATA
    (located on line 42) from "version=\"1.0\"" to "version=\"1.0\"
    encoding=\"UTF-8\"". The save your source file and
    select Options >> Create Object file. This object file
    (cvixml.obj) is attached to your cvixml.fp function panel. 
    To test this out, you could simply use some code like
    CVIXMLNewDocument ("RootElement", &xmlDoc);
    CVIXMLSaveDocument (xmlDoc, 0, "C:\\Test.xml");
    Then the Test.xml document should say
    <?xml version="1.0" encoding="UTF-8"?>
    <RootElement/>
    Hope this helps!
    Best Regards,
    Jonathan N.
    National Instruments

  • HTML encoding of XML tags

    Hi ,
    I am using openSAML and passing an XML document as a string to the SAMLAttribute.
    But when i see in the logs, the XML tags like "<" , ">" are being displayed as &lt and &gt. I don't want this HTML encoding to happen ... I don't know why this is happening ?
    Please advise. Yours help is greatly appreciated.
    Thanks in advance.

    I'm not sure but I think you need to have double quotes.
    ""<"" "">""
    sandyR

Maybe you are looking for

  • Use of Table Valued Parameter to restore databases

    I'm a noob with table valued parameters.  Not sure if I can use TVP for what I need to do.  I want to restore/refresh multiple databases from arbitrary number of .BAK files.  I can successfully populate a TVP with the needed source information which

  • 11x17 tabloid does not print correctly

    I am using an HP Photosmart printer model 8550, my previous printer was an HP Photosmart 8750. That printer died and the 8550 is the newer model of the same printer. When trying to print an 11X17 document in tabloid, the page does not print correctly

  • ACs For Windows 4.1.(1) build 23

    Hi. We´ve got two Windows 2003 Server R2 machines, with installed Cisco ACS For Windows 4.1.(1) Build 23 used for RADIUS users authentication and now days we´re trying to deploy now a TACACS+ configuration to the network device manage now from those

  • Reiser4 patch for grub

    downloaded the menu.lst and install-grub from the wiki: http://wiki.archlinux.org/index.php/Rei - _materials ran makepkg -i and got this: [root@estergon grub-97]# makepkg -i ==> Making package: grub 0.97-2 (Fri Dec 23 18:21:01 PST 2005) ==> Checking

  • Size limitation in Sticky Notes?

    We have a user who, upon opening her PDF in Adobe Acrobat 7, has difficulty opening and editing some sticky notes.  I noted that one in particular had a large amount of text, and was wondering if there is a size/text limitation in sticky notes? Thank