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

Special characters are missing while converting xmlData to Document

  • 1.  Special characters are missing while converting xmlData to Document

    Posted Tue April 15, 2003 05:12 PM

    Hi,

    Can any one help me about this one. I am getting xml data from another application, in webMethods pipeline xml data looks exactly same xml as applicaiton send. When I am tring to convert this xml data to Record using StringToDocument and DocumentToRecord, some of the data(specialcharecters) is missing.


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


  • 2.  RE: Special characters are missing while converting xmlData to Document

    Posted Tue April 15, 2003 05:25 PM

    Which special characters? Is the XML string properly encoded? For example, & encoded with &


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


  • 3.  RE: Special characters are missing while converting xmlData to Document

    Posted Tue April 15, 2003 05:28 PM

    Vinay

    Try using pub.string.HTMLEncode prior to invoking the StringToDocument.

    Haithem


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


  • 4.  RE: Special characters are missing while converting xmlData to Document

    Posted Tue April 15, 2003 06:28 PM

    Vinay,

    In the recordToDocument Service set encode parameter to “true”,then it can accept special chars like &<&gt etc…

    HTH…


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


  • 5.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 11:52 AM

    Hello everybody,

    i have the same problem with typical german characters.
    I can see ö,ä,ü sending to SAP but they are not in the incomming IDOC.

    Already tried encoding with “ISO8859-1”

    Any idea?

    Thanks,

    Dennis

    Forgot my password :slight_smile:


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


  • 6.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 01:09 PM

    Hello Dennis,

    It is not clear if you are getting the message from SAP or are you sending the data to SAP. Anyway the correct encoding is ‘ISO-8859-1’ and not ‘ISO8859-1’. Please give more details so that we can help better.

    • Rajesh Rao

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


  • 7.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 03:31 PM

    Hi Rajesh,

    we send the message from wM to SAP.
    In our last stap, we get the message out of trading networks (here we can see our ö,ä,ü), decode it and send it to SAP.

    When I safe the pipeline after the outbound process, I can see that the ö,ä,ü are manipulated.

    So I guess it must be somewhere in the service:

    The decoding had no effect.

    Dennis


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


  • 8.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 04:17 PM

    Hi Dennis,

    Is the document which you are passing to decode service encoded with ISO-8859-1? If no the best thing is to do convert the document to ISO-8859-1 first and then call the decode service.

    Are you having a variable ‘$encoding’ in the pipeline, before you call the decode service?

    Is the value of this variable set to ‘ISO-8859-1’.

    How is the data displayed in SAP?

    • Rajesh Rao

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


  • 9.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 04:52 PM

    Hi Dennis,
    You should encode the document at the entry point in webMethods. When you use first StringToDocument there is a variable encoding and set this to UTF-8 and this should take care of it.
    We do have the special,spanish and french characters inside the documents and thats how we solved specifying UTF-8 encoding.

    Just to clearify where these characters are getting messed up in WM or SAP because in WM these characters(ö,ä,ü) are looking fine even if you don’t specify any encoding.

    WM supports by default UTF-8 but in our case it did not work and we had to specify explicity.

    Try this and it might help.

    Regards,
    MJ


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


  • 10.  RE: Special characters are missing while converting xmlData to Document

    Posted Wed August 06, 2003 05:19 PM

    Many, Many thanks to both of you.

    It was just the UTF-8.

    It can be so easy :slight_smile:

    Dennis


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


  • 11.  RE: Special characters are missing while converting xmlData to Document

    Posted Thu June 13, 2019 07:58 PM

    I’m sending Data with & to SAP PI from webMethods but it’s getting failed at SAP Pi as it’s not coming as & can you please guide me how to send encoded format of & to SAP PI. I’M using SAP xi adapters to post data


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


  • 12.  RE: Special characters are missing while converting xmlData to Document

    Posted Thu June 13, 2019 08:19 PM

    Have you tried sending it as html character entity, for & it is “&” (ignore the double quotes)

    Check the docs for “pub.string:HTMLEncode”


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