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.


#TechXchangePresenter
 View Only
  • 1.  How to change encoding from ISO to UTF on customerbs document

    Posted Thu March 25, 2004 06:50 PM

    Hi,

    I’ve read many thread on this but none seems to be complete…

    We receive an xml document from one of our customer with
    <?xml version=“1.0” encoding=“iso-8859-1”?>
    as the encoding.
    We want to replace it with
    <?xml version=“1.0” encoding=“UTF-8”?>
    because it’s messing up some french characters. They can’t change it so we must do something on our end.

    I know I may have to build a new receive service (instead of the default wm.tn:receive one) but I’m not sure of the steps I should use. Should I do a recognize first an then transform the string or bytes to utf-8 ? Or maybe I should use some recordtodocument/documenttorecord ? I’m not sure…

    Can anyone help ?

    Thanks !
    Mat


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 2.  RE: How to change encoding from ISO to UTF on customerbs document

    Posted Thu March 25, 2004 07:27 PM

    The service pub.xml:loadXMLNode (set encoding=utf-8) might help the problem.Invoke this in your custom receive service and Once you have Node in the pipe use the xmlNodeToDocument (for parsing)

    This is a straight forward approach that replaces the encoding.Sorry if this is not you are looking for.

    HTH,


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: How to change encoding from ISO to UTF on customerbs document

    Posted Thu March 25, 2004 10:18 PM

    Yeah, that make sense but i forgot to say that we’re using 4.6 and not 6.0 so these services does not exist.

    I found a way to do it with converting the $xmldata string before calling the recognize (inside the wm.tn:receive service):

    stringToBytes (set encoding to UTF-8)
    bytesToString
    stringToDocument
    and then call wm.tn:receive

    It does the job!

    Thanks anyway for your quick response.


    #Integration-Server-and-ESB
    #B2B-Integration
    #webMethods


  • 4.  RE: How to change encoding from ISO to UTF on customerbs document

    Posted Tue November 16, 2004 09:10 PM

    I’m experiencing this problem with an EDI X12 file. The encoding in the EDI config file is set to UTF-8. The file is dropped off in a file poller directory where the file poller service ftp’s the file wn.tn.receive. On the ftp command I’m setting the encoding to UTF-8 but the file still gets truncated at the french e.

    Any suggestions how to fix this?


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 5.  RE: How to change encoding from ISO to UTF on customerbs document

    Posted Tue November 16, 2004 09:39 PM

    What encoding is the operating system?


    #webMethods
    #Integration-Server-and-ESB
    #B2B-Integration


  • 6.  RE: How to change encoding from ISO to UTF on customerbs document

    Posted Wed November 17, 2004 05:45 PM

    Ray,

    I’m on WIN2K system. The default encoding for wm is UTF-8.
    I’m not sure if that’s what you were asking.

    chris


    #webMethods
    #B2B-Integration
    #Integration-Server-and-ESB