XML export encoding problem

Hi all,
I've got a problem when I export BW query data in xml format. I send the xml file containing query data to a BSP controller and read out the file using form fields. The problem is that some characters get 'damaged': german characters like 'äöüÄÖÜ' etc. or '€' can't be received correctly. I assume that the query gets export in iso 8859-1 encoding and the BSP controller expects utf-8. Is there a possibility to change the export encoding of the xml document before it gets send to the BSP controller? Or is there other solution?
Thanks in advance,
Dominik

Hello,
         The solution for this issue is before transferring  the xml  file convert it to xstring with proper encoding and then send iit to BSP,
you can use the following,
call function 'SCMS_STRING_TO_XSTRING'
regards,
karthik

Similar Messages

  • Problem with Xml exporter

    Hi All,
    Thanks in advance for ur warm replies.
    I am exporting personalizations which i did but iam facing problems with this.
    Please help me on this issue.
    Steps i follwed.
    Step1: exec jdr_utils.listcustomizations('/oracle/apps/ego/item/eu/webui/EGOITEMATTRIBUTEPGL');
    It displays me the customizations which i did as follows
    /oracle/apps/ego/item/eu/webui/customizations/responsibility/24091/EGOITEMATTRIBUTEPGL
    Pl/sql procedure completed successfully.
    Step2: Iam now at command prompt on java_top and i run the following command
    java oracle.jrad.tools.xml.exporter.XMLExporter
    /oracle/apps/ego/item/eu/webui/customizations/responsibility/24091/EGOITEMATTRIBUTEPGL
    -username apps -password <mypwd> \
    -dbconnection "(description=(address_list=(address=(protocol=tcp)(host=<host>)(port=<myport>)))(connect_data=(sid=<mysid>)))" \
    -rootdir "/oracle/apps/ego/item/eu/webui/EGOITEMATTRIBUTEPGL'"
    * I don't know exactly what is root directory here. which path i need to provide here.*
    Error: No such file or directory.
    Thanks and Regards
    Zaheer

    Zaheer,
    <output_dir> - (Required) Output directory where the exported xml file structure is to be stored. You may set this to any directory, however, we recommend that you export your packages or XML files to $APPL_TOP/personalizations.
    If you run the export tool for the package
    /oracle/apps/ak/dem/webui/customizations/site/0/REQORDERSTATUSPAGE and specify -rootdir
    $APPL_TOP/personalizations, the xml file is saved as
    $APPL_TOP/personalizations/oracle/apps/ak/dem/webui/customizations/site/0/REQORDERSTATUS PAGE.xml.
    In your case define rootdir as rootdir "/oracle/apps/ego/item/eu/webui ".
    Thanks
    --Anil                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • XML export character encoding bug

    I've found a bug with Final Cut Pro XML export for any projects where media has a "#" in the name. Premiere Pro passes the "#" character into the file pathname instead of encoding it as "%23". The result is any clips with names such as "clip #1", "clip #2", "clip #3", etc. will be broken whe the XML is imported by another application. Compare:
    Premiere Pro XML (does not work):
    <pathurl>file://localhost/Volumes/P50%20Production%20Drive%202/CNMT%202011-12/CNMT%202011- 12%20Final%20Cut%20Pro%20Documents/Mom%20is%20Never%20Wrong/
    CNMT_MomNeverWrong_Street_12_14_11/Clip%20#2.mov</pathurl>
    Final Cut Pro XML (works properly):
    <pathurl>file://localhost/Volumes/P50%20Production%20Drive%202/CNMT%202011-12/CNMT%202011- 12%20Final%20Cut%20Pro%20Documents/Mom%20is%20Never%20Wrong/
    CNMT_MomNeverWrong_Street_12_14_11/Clip%20%232.mov</pathurl>
    Note the difference in the clip name. A global search and replace of "#" with "%23" makes the Premiere Pro XML work properly.
    This bug is easily repeatable and verifiable. I've filed a bug report but wanted to post here just to give folks a heads up.
    Thanks for your help!
    --dhl

    This tech note will help:
    http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsunone%2F7717&zone_110=7717%2A%20
    ka

  • XML deserialize and decrypting encoding problem. Please help me

    This is my first topic here, so at first I'd like to say "Hi" everyone and apologise for my bad english ;)
    I have just finished my new application about signing/checking and encrypting/decrypting XML files. I use Apache XML Security packages to do this.
    Everything works fine, instead of one...
    I'm Polish and sometimes I have to encrypt or decrypt XML which includes polish letters like: '&#261;' , '&#281;', '&#322;' and some others... If I encrypt such file, it succeeds. The problem is when I try to decrypt such an encrypted file. I recieve an error like :
    "[Fatal Error] :2:7: An invalid XML character (Unicode: 0x19) was found in the element content o
    f the document.
    gov.mf.common.exceptions.SenderException: E_SENDER_DECRYPTION
    at gov.mf.common.xml.encryption.EncryptTool.decrypt(Unknown Source)
    at gov.mf.CERBER.TestCBR.main(Unknown Source)
    Caused by: org.apache.xml.security.encryption.XMLEncryptionException: An invalid XML character
    (Unicode: 0x19) was found in the element content of the document.
    Original Exception was org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x19)
    was found in the element content of the document.
    at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)
    at org.apache.xml.security.encryption.XMLCipher.decryptElement(Unknown Source)
    at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown Source)
    ... 2 more
    What's wrong? My XML document is UTF-8 encoded, with or without BOM. I wrote in in Notepad++ or any other editior which has UTF-8 encoding.
    I'm parsing my XML with DOM. There is an interesting line in an error above like: " at org.apache.xml.security.encryption.XMLCipher$Serializer.deserialize(Unknown Source)" , do you know that?
    Everything is fine when I try to encrypt/decrypt '�' or '&#324;', but things go wrong with '&#261;', '&#281;', '&#322;' and others... I also managed to encrypt and decrypt '&#322;' but unfortunately, after decryption '&#322;' turns into 'B'. It obviously an encoding problem, but how to fix it?
    I would be really thankfull if some of You guys would help me.
    Looking forward fo any answers.
    Matthew
    Message was edited by:
    matthew_pl

    Hi once again.
    I still don't havy any solution to my problem. I used Apache XML Security examples to encrypt/decrypt my XML document with Polish charaters but I also recieve the same error. What's wrong?
    Here is some code:
    ----- Parsing XML do Document ------
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         //Bardzo wazna linijka - bless TEK ;)
         factory.setNamespaceAware(true);
         DocumentBuilder builder;
         builder = factory.newDocumentBuilder();
         File f = new File(Const.FILE_IN_PATH + File.separator + Const.FILE_IN);     
         org.w3c.dom.Document doc = builder.parse(f);
    ---------- Encrypting & Decrypting XML document (whole class) -------------
    import java.io.*;
    import java.security.*;
    import javax.crypto.SecretKey;
    import javax.crypto.SecretKeyFactory;
    import javax.crypto.spec.DESedeKeySpec;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.apache.xml.security.keys.KeyInfo;
    import org.apache.xml.security.utils.EncryptionConstants;
    import org.apache.xml.security.encryption.XMLCipher;
    import org.apache.xml.security.encryption.EncryptedData;
    import org.apache.xml.security.encryption.EncryptedKey;
    public class EncryptTool
    private PublicKey publicKey;     
    private PrivateKey privateKey;
    static
    org.apache.xml.security.Init.init();
    public EncryptTool()
         publicKey = KeyStores.getCerberPublicKey();
         privateKey = KeyStores.getCerberPrivateKey();
    public Document encrypt(Document doc, String sufix)
    try
         byte[] passPhrase = "24 Bytes per DESede key!".getBytes("UTF-8");
         DESedeKeySpec keySpec = new DESedeKeySpec(passPhrase);
         SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DESede");
         SecretKey secretKey = keyFactory.generateSecret(keySpec);
         XMLCipher keyCipher = XMLCipher.getInstance(XMLCipher.RSA_v1dot5);
         keyCipher.init(XMLCipher.WRAP_MODE, publicKey);
         EncryptedKey encryptedKey = keyCipher.encryptKey(doc, secretKey);
              Element elementToEncrypt = (Element) doc.getDocumentElement();
              System.out.println("Szyrfuj&#281;: " + elementToEncrypt.getTextContent());
              XMLCipher xmlCipher = XMLCipher.getInstance(XMLCipher.TRIPLEDES);
              xmlCipher.init(XMLCipher.ENCRYPT_MODE, secretKey);
              EncryptedData encryptedDataElement = xmlCipher.getEncryptedData();
              KeyInfo keyInfo = new KeyInfo(doc);
              keyInfo.add(encryptedKey);
              encryptedDataElement.setKeyInfo(keyInfo);
              boolean encryptContentsOnly = true;
              xmlCipher.doFinal(doc, elementToEncrypt, encryptContentsOnly);
              // output the resulting document
              String [] parts = Const.FILE_IN.split("\\.");
              String saveAs = Const.FILE_OUT_PATH + File.separator + parts[0] + sufix + "." + parts[1];
              OutputStream os = new FileOutputStream(saveAs);
              XMLUtil.sameXMLtoFile(doc, os);
    } catch (Exception ex)
         throw new TestCBRException("E_CERBER_ENCRYPTION", ex);
    return doc;
    public void decrypt(Document doc, String sufix) throws SenderException
    try
              String namespaceURI = EncryptionConstants.EncryptionSpecNS;
         String localName = EncryptionConstants._TAG_ENCRYPTEDDATA;
         int ile = doc.getElementsByTagNameNS(namespaceURI, localName).getLength();
         if (ile == 0) throw new SenderException("E_SENDER_DECRYPTION_NEEDED");
         for(int i=0; i < ile; i++)
         Element encryptedDataElement = (Element) doc.getElementsByTagNameNS(namespaceURI, localName).item(0);
         XMLCipher xmlCipher = XMLCipher.getInstance();
         xmlCipher.init(XMLCipher.DECRYPT_MODE, null);
         xmlCipher.setKEK(privateKey);
         xmlCipher.doFinal(doc, encryptedDataElement);
                   String [] parts = Const.FILE_IN.split("\\.");
                   String saveAs = Const.FILE_OUT_PATH + parts[0] + sufix + "." + parts[1];
                   OutputStream os = new FileOutputStream(saveAs);
                        XMLUtil.saveXMLtoFile(doc, os);
    } catch (SenderException ex) {
         throw ex;
    } catch (Exception ex) {
         throw new SenderException("E_SENDER_DECRYPTION", ex);
    Please help me. I'm going into madness what's wrong with it...

  • CS2/MAC/Applescript: XML Export problem with Special Character (thin space).

    Hi,
    I just have noticed that the base XML export of Indesign doesnt encode/keep the unicode value of Thin Space in the exported XML. Strangely, a non-breaking space is encoded ( ) and a few other higher range unicode values (well not encoded, it's in the text data just like any other character).
    The thin space is converted to a char 63 (?). I have tried utf8 and utf16.
    Is this behavior documented somewhere? There is no option in the export window.
    Does it mean that the only complete and reliable way to export text data is to have another script to export the tagged page item text content? (i definitively can do this, but it's remove alot of the simplicity of using the base XML export) [and make any simple xml/text roundtrip unfunctionnal]
    Anyone having experience with XML workflow can confirm if i have just met a known limitation of Indesign??
    Thanks,
    Eric

    Oups! I was able to find something here on the same subject:
    http://www.adobeforums.com/webx/.59b561c7/0

  • How to detect the root cause of  XML encoding problem ?

    Hi,
    I need to identify the exactly root cause of error when parssing a XML ( ISO-8859-1 encoding) problem.
    How can I do this using JAVA ?
    regards
    ICP

    Hi dekassegui,
    Thanks for your response
    The error is an error from Oracle HTTP adapter servlet. The message error is : "oracle.xml.parser.v2.XMLParseException"
    My intention is to verify the data before thats receieved by the adapter and the servlet.
    I did my own servlet extending the orgirinal servlet to show and log the entire received content. The content looks "OK".
    Now I would like to check a possible special character or symbol unsupported by enconding.
    The Input data is aware of my control. But if the error could be detected, message senders will correct this.
    My major problem is to ensure what is the root cause of the error.
    regards,
    ICP

  • XML data - charset encoding problem

    Hello all,
      I am facing an issue on charset encoding. My requirement is to send an XML and read the the output XML to display the output. The output XML is encoded in "ISO-8859-1" and we are retrieving/reading it in "UTF-8". But some special characteres in the output XML are appearing as it is.
      Could some one let me know on how to obtain the desired characters.
    Code snippet while reading the XML:
    BufferedReader inStream = null;
    BufferedWriter outStream = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream(),"UTF-8"));
    inStream =
         new BufferedReader(new InputStreamReader(inputStream,"UTF-8"));
    Thanks & regards,
    Sharath

    Hi Sharath,
    To read the XML file use the following. Don’t mention the character set during reading it.I hope it will help you.
    XML file(emp.xml)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Emp>
    <EmpDetails>
           <firstname>Sarbari</firstname>
           <lastname>Saha</lastname>
      </EmpDetails>
      <EmpDetails>
           <firstname>Tumpa</firstname>
           <lastname>Hazra</lastname>
      </EmpDetails>
    </Emp>
    Java File
    import java.io.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    import org.w3c.dom.NamedNodeMap;
    class ReadXML
         public static void main(String args[])
              try
                   String fileName="emp.xml";
                   DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                   Document doc = docBuilder.parse (fileName);
                   NodeList nodeList = doc.getChildNodes();
                   int nodeSize = nodeList.getLength();
                   for (int i=0;i<nodeSize;i++)
                        Node node = nodeList.item(i);
                        Element elm = (Element) node;
                        NodeList EmpDetailsList=elm.getElementsByTagName("EmpDetails");
                        int stNodeSize = EmpDetailsList.getLength();
                        System.out.println("NodeSize =  "+stNodeSize );
                        for(int j=0;j<stNodeSize;j++)
                                  Node nodeEmpdtl = EmpDetailsList.item(j);
                                  Element elmDetails = (Element) nodeEmpdtl;
                                  NodeList firstnameList=elmDetails.getElementsByTagName("firstname");
                                  NodeList lastnameList=elmDetails.getElementsByTagName("lastname");
                                  Node fnameNode=firstnameList.item(0);
                                  System.out.print("Node : " + fnameNode.getNodeName());
                                  System.out.println ("  Value : "+((Element)fnameNode).getChildNodes().item(0).getNodeValue());
                                  int lastnameNodeSize = lastnameList.getLength();
                                  Node lnameNode=lastnameList.item(0);
                                  System.out.print("Node : " + lnameNode.getNodeName());
                                  System.out.println("  Value : "+((Element)lnameNode).getChildNodes().item(0).getNodeValue());
              catch(ParserConfigurationException pce)
                   System.out.println("Inside ParserConfigurationException Exception");
              catch(SAXException se)
                   System.out.println("Inside SAXException Exception");
              catch(IOException ioe)
                   System.out.println("Inside IOException Exception");
    Regards,
    Mithu

  • XML data encoding iso-8859-1 . Currently utf-16 is default encoding

    Hello ABAP Gurus ,
    Need a help from you .
    Scenario : We have SAP4.7 enterprise version which we have now converted to Unicode system . There is a BSP application which talks to an external web application (Non Unicode) thru HTTP protocol and sends data thru XML.
    Problem : Problem is at the time when BSP application prepares the XML While preparing XML data , before converting to Unicode environment the encoding was "iso-8859-1" . But now after Unicode conversion , the encoding is "UTF-16".
    The XML data looks like
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    I have tried replacing "utf-16" by "iso-8859-1 " . The interface works . But at the recieving end , ie external web application , the German umlauts appear as some garbage values .
    I know we need to enforce encoding . I have tried with the following code but could not suceed . The encoding appears as "utf-16".
    Following is the section of code which I have written in BSP application.
      Daten in DOM-Baum wandeln
        CALL FUNCTION 'SDIXML_DATA_TO_DOM'
          EXPORTING
            name        = 'DATA'
            dataobject  = ls_cr_xml
          IMPORTING
            data_as_dom = if_dom
          CHANGING
            document    = if_document
          EXCEPTIONS
            OTHERS      = 1.
        IF sy-subrc NE 0.
          error_out text-f47 text-f48 space space.
        ENDIF.
      DOM-Baum in Character-Stream wandeln
        if_pixml = cl_ixml=>create( ).
        IF if_pixml IS INITIAL.
          error_out text-f50 text-f53 space space.
        ENDIF.
        if_pstreamfact = if_pixml->create_stream_factory( ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f51 text-f53 space space.
        ENDIF.
        if_postream = if_pstreamfact->create_ostream_cstring( string = xml_doc ).
        IF if_pstreamfact IS INITIAL.
          error_out text-f52 text-f53 space space.
        ENDIF.
    --Encoding--
    data: gv_str type string.
    data: gv_l_xml_encoding type ref to if_ixml_encoding.
    data gv_l_resultb type boolean.
    gv_str = 'ISO-8859-1' .
    clear gv_l_xml_encoding.
          call method if_pixml->create_encoding
            EXPORTING
              byte_order    = 0
              character_set = gv_str
            RECEIVING
              rval          = gv_l_xml_encoding.
          clear gv_l_resultb.
          call method gv_l_xml_encoding->set_character_set
            EXPORTING
              charset = gv_str
            RECEIVING
              rval    = gv_l_resultb.
            call method if_document->set_encoding
            EXPORTING
              encoding = gv_l_xml_encoding.
    ----Append child -
    CALL METHOD if_document->append_child
          EXPORTING
            new_child = if_dom
          RECEIVING
            rval      = lv_return.
        IF lv_return NE 0.
          error_out text-f47 text-f49 space space.
        ENDIF.
    --Render the XML data to output stream--
        CALL METHOD if_document->render
          EXPORTING
            ostream = if_postream.
    After this section of code is executed , the variable xml_doc  gets filled up with XML data .
    <?xml version="1.0" encoding="utf-16"?><DATA><ACTION>CREATE_TICKET</ACTION><CRI
    Can anybody help how to enforce encoding ?
    Regards,
    Laxman Nayak.

    Hi Aslam Riaz,
    Did you find any solution..?
    Kindly help me on this issue.
    Thanks and Regards,
    Shailaja Chityala

  • Character encoding problem using XSLT and Tomcat on Linux

    Hi,
    I have an application running on a Tomcat 4.1.18 application server that applies XSLT transformations to DOM objects using standard calls to javax.xml.transform API. The JDK is J2SE 1.4.1_01.
    It is all OK while running on a development enviroment (which is Windows NT 4.0 work station), but when I put it in the production enviroment (which is a red hat linux 8.0), it comes up with some kind of encoding problem: the extended characters (in spanish) are not shown as they should.
    The XSL stylesheets are using the ISO-8859-1 encoding, but I have also tried with UTF-8.
    These stylesheets are dynamicly generated from a JSP:
    // opens a connection to a JSP that generates the XSL
    URLConnection urlConn = (new URL( xxxxxx )).openConnection();
    Reader readerJsp = new BufferedReader(new InputStreamReader( urlConn.getInputStream() ));
    // Gets the object that represents the XSL
    Templates translet = tFactory.newTemplates( new StreamSource( readerJsp ));
    Transformer transformer = translet.newTransformer();
    // applies transformations
    // the output is sent to the HttpServletResponse's outputStream object
    transformer.transform(myDOMObject, new StreamResult(response.getOutputStream()) );Any help would be appreciated.

    Probably you need to set your LANG OS especific environment variable to spanish.
    Try adding this line:
    export LANG=es_ES
    to your tomcat/bin/catalina.sh, and restart tomcat.
    It should look like this:
    # OS specific support.  $var _must_ be set to either true or false.
    cygwin=false
    case "`uname`" in
    CYGWIN*) cygwin=true;;
    esac
    export LANG=es_ES
    # resolve links - $0 may be a softlink
    PRG="$0"
    .(BTW, keep using ISO-8859-1 encoding for your XSL)
    HTH
    Un Saludo!

  • Table export / import problems (no readers registered...)

    hi there
    just started using SQL_DEV. i'm using ora10g, winxp and the latest SQL_DEV 1.5.1.
    now to my problem:
    i'm able to export tables but when i want to re-import them (be it xml, sql, csv,) i get the message: "no readers registered for the ...type."
    what does it mean and how can i solve this?
    thanks a lot for any hints
    chris.

    hi arf
    man, sorry how can this be so difficult? i set all various options for decimal and group seperators but nothing worked...
    shouldn't a tool that provides the most standard operations work? without playing around with settings one doesn't understand either?
    what is the group seperator used for? can you propose a setting that works? what do i have to define there...?
    all i wanna do is EXPORT table data (not table definition) from a user schema A and IMPORT the data in the same table on a user schema B.
    this i want to do preferrably in XML but would also go back to CSV if needed.
    if SQL_DEV can not provide this, i will go back to SQL plus and do it the old fashioned way...
    please check my XML export. what could be wrong with that? i'm not an expert in SQL but to me it doesn't look like
    a real structure to import it back...but what sense does then XML export have...?
    <?xml version='1.0' encoding='ISO-8859-1' ?>
    <RESULTS>
         <ROW>
              <COLUMN NAME="PROJID"><![CDATA[*]]></COLUMN>
              <COLUMN NAME="TXT"><![CDATA[Arrangement Plans]]></COLUMN>
              <COLUMN NAME="POS"><![CDATA[1]]></COLUMN>
         </ROW>
         <ROW>
              <COLUMN NAME="PROJID"><![CDATA[*]]></COLUMN>
              <COLUMN NAME="TXT"><![CDATA[Consumer List]]></COLUMN>
              <COLUMN NAME="POS"><![CDATA[2]]></COLUMN>
         </ROW>
         <ROW>
              <COLUMN NAME="PROJID"><![CDATA[*]]></COLUMN>
              <COLUMN NAME="TXT"><![CDATA[Control System]]></COLUMN>
              <COLUMN NAME="POS"><![CDATA[3]]></COLUMN>
    </RESULTS>
    cheers!!!
    chris

  • ABAP to XML file - Formatting problem and UTF-8 requirement

    Hi Everyone,
    Could you please guide us on the ABAP coding required to get the proper XML file format. We have prepared the code for downloading SAP transaction data into an XML file format. However, we are stuck with an improper format as per Example 1.
    The file format we get is this:
    Example 1:
    <?xml version="1.0"?><FDXLMDOrd><FXNHdrLp><CrtDtTm>20070613094517</CrtDtTm><MsgID>319304155</MsgID><MsgTyp>850</MsgTyp><MsgSubTyp>SALES_A</MsgSubTyp><Pr
    <RcvTP>FSCS</RcvTP><SndSrc>FXN</SndSrc><RcvSrc>EIB</RcvSrc><UsrID>VAR</UsrID></FXNHdrLp><OrdHdrLp><OrdNbr>319304155</OrdNbr><OrdActnCD>9</OrdActnCD><Ord
    teCarrReq>FDE</RteCarrReq><RteTptSvcReq>FEIP</RteTptSvcReq></DprtRteLp><SpecInstrLp><SpecInstrTyp>SHIP</SpecInstrTyp><SpecInstr>Example Packing Instruct
    les Order</RefDesc></RefLp><RefLp><RefIDQual>CPO</RefIDQual><RefID>test 1 line 1 pc - s</RefID><RefDesc>Customers Customer Purchase Order</RefDesc></Ref
    Typ><EntIDQual>91</EntIDQual><EntID>H00092</EntID><EntNm>VLAD BOBES</EntNm><Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA
    ></AdrLnLp><ConLp><ConTypCD>IC</ConTypCD><ConNm>VLAD BOBES</ConNm><CommLp><CommNbrQual>TE</CommNbrQual><CommNbr>514-731-8361</CommNbr></CommLp></ConLp><
    <Cty>MONTREAL</Cty><PstlCD>H3X 2N5</PstlCD><RgnalCD>QC</RgnalCD><CtryISOCD>CA</CtryISOCD><AddlNmLp><AddlNm1>VLAD BOBES</AddlNm1></AddlNmLp><AdrLnLp><Str
    However, the format need to look like this as in Example 2 below.
    We also need help in how to get  " encoding="UTF-8"?> " as part of the file format.
    Example 2:
    <?xml version="1.0" encoding="UTF-8"?>                
    <FDXLMDProdRcpt>                                      
        <FXNHdrLp>                                        
            <CrtDtTm>20070612151817</CrtDtTm>             
            <SessID>26796</SessID>                        
            <MsgTyp>861</MsgTyp>                          
            <MsgSubTyp>WRE_A</MsgSubTyp>                  
            <PrcsingPrty>5</PrcsingPrty>                  
            <SndTPQualCD>ZZ</SndTPQualCD>                 
            <SndTP>FSCS</SndTP>                           
            <RcvTPQualCD>ZZ</RcvTPQualCD>                 
            <RcvTP>EIB</RcvTP>                            
            <SndSrc>YANTRA</SndSrc>                       
            <RcvSrc>EIB</RcvSrc>                          
            <UsrID>VAR</UsrID>                            
        </FXNHdrLp>                                       
        <ProdRcptHdrLp>                                   
            <ShpID>VAR20070612NCHIC1</ShpID>              
            <ShpTyp> </ShpTyp>                            
            <ShpActnCD>00</ShpActnCD>                     
            <InTransMrgTyp> </InTransMrgTyp>              
            <ShpVolUOM>CI</ShpVolUOM>                     
            <ShpWgtUOM>LB</ShpWgtUOM>                     
            <ShpTotVol>310022.00</ShpTotVol>              
            <ShpTotWgt>861.00</ShpTotWgt>                 
            <DtTmLp>                                      
                <DtTyp>050</DtTyp>                        
                <DtTmQual>501</DtTmQual>                  
                <DtTm>2007-06-12T15:07:41-04:00</DtTm>    
            </DtTmLp>                                     
            <AdrLp>                                       
                <EntTyp>RC</EntTyp>                       
                <EntIDQual>93</EntIDQual>                 
                <EntID>NCHIC</EntID>                      
                <EntNm>NCHIC</EntNm>                      
                <AutoCrtTrdPar>0</AutoCrtTrdPar>          
                <AutoCrtTrdParRole>0</AutoCrtTrdParRole>  
                <AutoUpdtTrdPar>0</AutoUpdtTrdPar>        
            </AdrLp>                                      
            <ProdRcptTptLp>                               
                <TptIDQual>BOL</TptIDQual>                
                <TptSCAC> </TptSCAC>                      
                <TptID> </TptID>   
    Thanks and Best Regards
    Sitaraman

    You could try to use the following coding:
    *& Report  ZUS_SDN_UC_XML_TO_UTF8_TRANSF
    REPORT  zus_sdn_uc_xml_to_utf8_transf.
    define local data
    CONSTANTS:
      gc_encoding           TYPE string VALUE 'UTF-8'.
    DATA:
      gd_result             type string,
      go_ixml               TYPE REF TO if_ixml,
      go_stream_factory     TYPE REF TO if_ixml_stream_factory,
      go_encoding           TYPE REF TO if_ixml_encoding,
      go_resstream          TYPE REF TO if_ixml_ostream.
    DATA:
      gt_knb1    TYPE STANDARD TABLE OF knb1,
    gd_xml     TYPE string,
      gt_xml     TYPE TABLE OF string.
    START-OF-SELECTION.
      SELECT * FROM knb1 INTO TABLE gt_knb1 UP TO 10 ROWS
          WHERE bukrs = '1000'.
      go_ixml = cl_ixml=>create( ).
      go_stream_factory = go_ixml->create_stream_factory( ).
      go_encoding = go_ixml->create_encoding( character_set = gc_encoding
                                            byte_order = 0 ).
      go_resstream =
                  go_stream_factory->create_ostream_cstring( gd_result ).
      CALL METHOD go_resstream->set_encoding
        EXPORTING
          encoding = go_encoding.
    XML Transformieren
      CALL TRANSFORMATION id_indent
        SOURCE     itab = gt_knb1
        RESULT XML go_resstream.
      APPEND gd_result TO gt_xml.
      CALL METHOD cl_gui_frontend_services=>gui_download
        EXPORTING
         BIN_FILESIZE              =
          filename                  = 'C:\temp\xml_to_utf8.txt'
         FILETYPE                  = 'ASC'
         APPEND                    = SPACE
         WRITE_FIELD_SEPARATOR     = SPACE
         HEADER                    = '00'
         TRUNC_TRAILING_BLANKS     = SPACE
         WRITE_LF                  = 'X'
         COL_SELECT                = SPACE
         COL_SELECT_MASK           = SPACE
         DAT_MODE                  = SPACE
         CONFIRM_OVERWRITE         = SPACE
         NO_AUTH_CHECK             = SPACE
         CODEPAGE                  = SPACE
         IGNORE_CERR               = ABAP_TRUE
         REPLACEMENT               = '#'
         WRITE_BOM                 = SPACE
         TRUNC_TRAILING_BLANKS_EOL = 'X'
       IMPORTING
         FILELENGTH                =
        CHANGING
          data_tab                  = gt_xml
        EXCEPTIONS
          file_write_error          = 1
          no_batch                  = 2
          gui_refuse_filetransfer   = 3
          invalid_type              = 4
          no_authority              = 5
          unknown_error             = 6
          header_not_allowed        = 7
          separator_not_allowed     = 8
          filesize_not_allowed      = 9
          header_too_long           = 10
          dp_error_create           = 11
          dp_error_send             = 12
          dp_error_write            = 13
          unknown_dp_error          = 14
          access_denied             = 15
          dp_out_of_memory          = 16
          disk_full                 = 17
          dp_timeout                = 18
          file_not_found            = 19
          dataprovider_exception    = 20
          control_flush_error       = 21
          not_supported_by_gui      = 22
          error_no_gui              = 23
          OTHERS                    = 24.
      IF sy-subrc <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    END-OF-SELECTION.
    However, I like to mention that the file created from out ECC 5.0 (6.40, non-Unicode) contains a special character between the XML header and the data part (when displayed using NotePad Editor):
    ...xml version="1.0" encoding="utf-8"?>[special character]<asx:abap xmlns:asx="http://www.sap.com/a...
    Using a HexEditor the special character (0x0A) is displayed as a dot.
    Also Check with FM - TREX_TEXT_TO_UTF8
    Reward Points if it is helpful
    Thanks
    Seshu

  • Crystal Report 2008 SP2 & InfoView: Custom XML Export doesnt work

    Hi,
    I have created a Crystal Report .rpt and want to use the custom xml export function to output a custom xml file. For that, I created a custom transformation file (xsl) and imported it into the .rpt . On the client machine, if I open the .rpt with Crystal Reports 2008 SP2, and select to export it using the custom xml output, all runs fine. (under SP1, only half the file was created...)
    If I upload the .rpt file to Infoview (server-side: BO Enterprise 3.1, SP2 as well) and schedule it, I can select xml, and then my custom xml as output format, but I am getting the error message u201EUngültige Exportoptionen" (="invalid export options"), in the instance history. No output file is created. I use file system as destination. Other output formats like .pdf and .rpt work fine and files are created.
    Ideas:
    -Are there any more settings needed on the server (e.g.CMC - Crystal Server Jobs, other Processes, ...) so I can schedule the report and successfully create the custom xml format file as output?
    -Do I need to upgrade to a specific SP or FP on server-side so everything runs smooth?
    Thanks for your help!

    Hi Florian,
    I'm having the same problem, have you by any chance found a solution?
    Gajus.

  • Attempt to process file failed with Exception in XML Parser-format problem

    Hi all,
    Iam getting an unusual error in the J2EE stack in XI.
    And the message is:
    006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
    This means that error occured during content conversion of XML to the prescribed file format.
    Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
    Thanks in advance...
    karun

    Hi Bhavesh,
    Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
    The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
    2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
    2006-11-30 17:30:50 Success Start converting XML document content to plain text
    2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
    2006-11-30 17:31:07 Error Exception caught by adapter framework: null
    2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
    2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
    2006-11-30 17:31:07 Success The message status set to WAIT.
    2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
    2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
    2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1

  • Encoding problem while reading binary data from MQ-series

    Dear all,
    we are running on 7.0 and we have an encoding problem while reading binary data from MQ-series. Because we are getting flat strings from queue we use module "Plain2ML" (MessageTransformBean) for wrapping xml-elements around the incoming data.
    The MQ-Series-Server is using CCSID 850, which we configured in connection parameters in communication channel (both parameters for Queuemanager CCSID and also CCSID of target).If there are special characters in the message (which HEX-values differ from codepage to codepage) we get errors in our adapter while executing, please see stack-trace for further analysis below.
    It seems to us that
    1. method ByteToCharUTF8.convert() expects UTF-8 in binary data
    2. Both CCSID parameters are not used anyway in JMS-adapter
    How can we solve this problem without changing anything on MQ-site?
    Here is the stack-trace:
    Catching com.sap.aii.af.mp.module.ModuleException: Transform: failed to execute the transformation: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.af.modules.trans.MessageTransformBean.throwModuleException(MessageTransformBean.java:453)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:387)
        at com.sap.aii.af.mp.module.ModuleLocalLocalObjectImpl0_0.process(ModuleLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.af.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:292)
        at com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0_0.process(ModuleProcessorLocalLocalObjectImpl0_0.java:103)
        at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:84)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertBinaryToXiMessageFilter.filter(ConvertBinaryToXiMessageFilter.java:304)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:112)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:87)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filterSend(TxManagerFilter.java:123)
        at com.sap.aii.adapter.jms.core.channel.filter.TxManagerFilter.filter(TxManagerFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.DynamicConfigurationFilter.filter(DynamicConfigurationFilter.java:72)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.PmiAgentFilter.filter(PmiAgentFilter.java:66)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.InboundCorrelationFilter.filter(InboundCorrelationFilter.java:60)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JmsHeadersProfileFilter.filter(JmsHeadersProfileFilter.java:59)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageInvocationsFilter.filter(MessageInvocationsFilter.java:89)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.JarmMonitorFilter.filter(JarmMonitorFilter.java:57)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.filter.ThreadNamingFilter.filter(ThreadNamingFilter.java:62)
        at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:195)
        at com.sap.aii.adapter.jms.core.channel.SenderChannelImpl.doReceive(SenderChannelImpl.java:263)
        at com.sap.aii.adapter.jms.core.channel.ChannelImpl.receive(ChannelImpl.java:437)
        at com.sap.aii.adapter.jms.core.connector.MessageListenerImpl.onMessage(MessageListenerImpl.java:36)
        at com.ibm.mq.jms.MQMessageConsumer$FacadeMessageListener.onMessage(MQMessageConsumer.java:399)
        at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl$JmsProviderMessageListener.onMessage(JmsMessageConsumerImpl.java:904)
        at com.ibm.msg.client.wmq.v6.jms.internal.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:4249)
        at com.ibm.msg.client.wmq.v6.jms.internal.SessionAsyncHelper.run(SessionAsyncHelper.java:537)
        at java.lang.Thread.run(Thread.java:770)
    Caused by: com.sap.aii.messaging.adapter.trans.TransformException: Error converting Message: 'sun.io.MalformedInputException'; nested exception caused by: sun.io.MalformedInputException
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:714)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:538)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:528)
        at com.sap.aii.af.modules.trans.MessageTransformBean.processTransform(MessageTransformBean.java:471)
        at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:364)
        ... 36 more
    Caused by: sun.io.MalformedInputException
        at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:270)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:287)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:337)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:223)
        at java.io.InputStreamReader.read(InputStreamReader.java:208)
        at java.io.BufferedReader.fill(BufferedReader.java:153)
        at java.io.BufferedReader.readLine(BufferedReader.java:316)
        at java.io.LineNumberReader.readLine(LineNumberReader.java:176)
        at com.sap.aii.messaging.adapter.Conversion.convertPlain2XML(Conversion.java:310)
        at com.sap.aii.messaging.adapter.Conversion.service(Conversion.java:709)
        ... 40 more
    Any ideas?
    Kind regards, Stefan

    Hi Stefan,
    for the first MTB now we are using only one parameter: Transform.ContentType = text/plain;charset="ISO-8859-1"
    The second MTB, which does the XML-Wrapping, is configured like this:
    Transform.Class = com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType = application/xml
    xml.conversionType = SimplePlain2XML
    xml.fieldNames = value
    xml.fieldSeparator = §%zulu§%
    xml.processFieldNames = fromConfiguration
    xml.structureTitle = payload
    Both CCSID configuration parameters from the "Source"-Tab we've set to 850.
    Now, we don't get an error anymore - sun.io.malformedInputException - , but, unfortunately, now special character conversion succeeded (we need an "ß" and we get an ISO-HEX-E1 -> á).  E1 is (different from ISO) an "ß" in 850.
    Any ideas?

  • Report acts funny AND xml-export broken

    Hi @ all,
    1.
    My users are experiencing some weird problems: A report is displayed with the pagination showing that there are 59 rows, but the report is empty... only the column headings are shown!
    Take a look at the screen shot (2004-07-21_Report-Problem.JPG):
    http://marvel.oracle.com/pls/otn/p?n=3444139716751380138
    I've seen this only a couple of times and we thought that we had eliminated the problem by installing a newer version of the IExplorer (6.0). My users had some more difficulties with the older version (mostly 5.0).
    Creating this page I used the howto 'Build a master-detail application'. And yes, I'm positive, there are Samples associated with Delivery 11.
    Has anyone ever experienced such a thing?? How did you get around it? (especially this being such a sometimes-works-sometimes-doesn't-work phenomenon)
    2.
    Another thing: I tried the XML-export (Data Workshop) here in my installation. When I'm at the very end and click Export Data I just get an error message: ORA-04063: has errors ORA-04063: package body "FLOWS_010404.WWV_FLOW_DATALOAD_XML" has errors ORA-06508: PL/SQL: could not find program unit being called. (This happens whether the 'Export as file' -checkbox is checked or not!)
    I tried exactly the same thing on marvel.oracle.com and got a nice XML-file.     :-)
    Has anyone a clue what that program unit is that is not found?
    -David-

    David,
    1. Looks like a pagination problem. Look for threads on resetting pagination on this forum. Your mileage may vary, given the version of HTML DB you are running.
    2. I know you don't want to hear this, but it's time to upgrade to the production version of HTML DB. Like you said, it's working on htmldb.oracle.com. It's tough to say what may be wrong with your setup, other than that it's pre-release software.
    Sergio

Maybe you are looking for

  • Visual Voicemail problem on 02-UK, anyone else??

    I'm having a problem with my iPhone 3GS atm. Its to do with Visual Voicemail, basicly when some one leaves a message the phone doesn't inform me of it like it used to do a few weeks ago. If i turn the phone off with the red slider and power back up i

  • Iomega eGo 2TB USB/Firewire 800 drive not working with Time Machine.

    The drive I had for Time Machine died and I replaced it with an iomega eGo 2 TB USB/Firewire 800 drive. Time Machine finds it and backs up the disk when I first boot up but then it seems like the drive goes off line. At that point, when Time Machine

  • Need Help with Photo albums in iPhone 4s!!

    Help!  Just synced my new iphone 4s, but now I have three albums in my photos! Not only do I have the "camera roll," I also have "photo library, " and "internal storage."  The internal storage album duplicated all my photos , so now they appear twice

  • Squeezed Image in QuickTime from FCP

    Although I've come close to finding my specific issue when perusing the discussions, I haven't had much success. I shot in 16:9 on the XL2. I changed all my settings in FCP before logging and capturing to accommodate this. It looks fine in FCP, inclu

  • Add link to a folder in fileshare

    Hi, i want to add a column to a list, when the value in this column is a link to a folder in fileshare. can someone help with the syntax? keren tsur