IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Mail problem with frensh accent in an XML file.

  • 1.  Mail problem with frensh accent in an XML file.

    Posted Thu March 22, 2007 09:42 AM

    Hello,

    i have to take a file by email.
    The file is an XML file and there are some accents in like “é”, “è”, “à” …

    I always have “é” instead of these caracteres in my mimeData file …

    How to solve this problem and have some accents ?


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 2.  RE: Mail problem with frensh accent in an XML file.

    Posted Thu March 22, 2007 09:50 AM

    same problem on the advantage site … no accent :frowning:


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Mail problem with frensh accent in an XML file.

    Posted Thu March 22, 2007 11:37 AM

    Problem solved with a java service :

    // pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();
    Object stream = IDataUtil.get( pipelineCursor, “stream” );
    String encoding = IDataUtil.getString( pipelineCursor, “encoding” );
    pipelineCursor.destroy();
    // pipeline

    String strLine;
    String strDecode;
    try{
    BufferedReader bufferReader = new BufferedReader ( new InputStreamReader((InputStream)stream, encoding ), 65535);
    StringBuffer strBuffer = new StringBuffer();
    while ((strLine = bufferReader.readLine()) != null) {
    strBuffer.append(strLine);
    }
    strDecode = strBuffer.toString();
    }
    catch(Exception e){
    throw new ServiceException( e );
    }

    IDataUtil.put( pipelineCursor, “strDecode”, strDecode );
    pipelineCursor.destroy();


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 4.  RE: Mail problem with frensh accent in an XML file.

    Posted Fri March 23, 2007 11:34 AM

    Hi what encoding you used? can you send more details like what will happen, if your document contains the XML special characters like ‘&’; etc.

    What happens, even if we set encoding property in documentToXMLString it generates the error while converting XMLNode to Document.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General