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.  Ampersand in the XML tag

    Posted Wed September 03, 2003 07:38 PM

    Hi!

    I am trying to send a XML to my flow service. I have used queryXMLNode to get the values of the tags. In one of my tag, i have “&”.
    When i try to send XML to my flow service with such value, it gives me an error as “element is missing end tag”.
    Sample tag,

    <abc>test & test</abc>

    Is it that we cannot use “&” in our xml tag content. Doesnot seems good.

    Please suggest.

    regards,
    sandip


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Ampersand in the XML tag

    Posted Wed September 03, 2003 08:03 PM

    & in XML is invalid. It needs to be converted to the corresponding entity representation i.e. &


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Ampersand in the XML tag

    Posted Wed September 03, 2003 08:08 PM

    Hi Sandip,

    You have to encode those type of characters(& and '). U have to use HTMLEncode format before you send to services, like “&” “'”. It should fix that.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Ampersand in the XML tag

    Posted Wed September 03, 2003 08:44 PM

    While this is certainly invalid XML, a document should be able to consume this character. Review XML reserve characters and escape characters. Using escape characters you should be able to process your document.

    HTH,
    Jim Palmer


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: Ampersand in the XML tag

    Posted Mon September 08, 2003 01:14 PM

    I have the same similiar problem as well. But for me, I face that problem when i send back the information which i receive from my source back to my client.

    ie. Assuming my Client system, (System A) requests information from System B, based on a particular person’s ID. (in an XML, via HTTP)
    System B returns the information back to me (in an XML, via HTTP).
    But when i send the information back to System A (again in an XML, via HTTP), i face ‘ampersand’ error.
    My client system displays the message of ‘element is missing end tag’.

    How do i solve this?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Ampersand in the XML tag

    Posted Mon September 08, 2003 05:49 PM

    Hi!

    Either replace all occurence of ampersand with <ampersand>amp<semicolon>. This would help you to solve the problem. Or u could do HTML encoding as mentioned above.

    HTH


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB