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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Node to String

    Posted 05/29/09 09:47 AM

    Hi all,

    my external client is passing in calling one of my flow services using HTTP Post, and sending in an xml string inside the request body.



    This xml string is defined as a Node in my flow service input.
    When I call xmlNodeToDocument, there will be an error thrown because the xml in the node is not valid (not well-formed).



    It is not possible for external client to fix the xml.
    So, is there any other way for me to convert a Node into an XML string without using xmlNodeToDocument ?



    Any tips on using Java to manipulate com.wm.lang.xml.Node/Document ??


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


  • 2.  RE: Node to String

    Posted 05/29/09 11:34 AM

    You have the xml string in the request body. You would have the input in anyone format, either as String, or Bytes object or Stream object.

    Use xmlString to node and xml node to document services to change it to IS document type.

    xmlStringToXMLNode - it can take string / bytes / stream as input
    xmlNodeToDocument


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


  • 3.  RE: Node to String

    Posted 05/29/09 11:43 AM

    unfortunately the xml string is not valid (not well-formed).
    so when i call xmlNodeToDocument, it will not be able to validate the xml and throw an error.


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


  • 4.  RE: Node to String

    Posted 05/29/09 12:34 PM

    If XML is not well formed, no parsers can parse the xml properly… You should have a valid xml format in order to parse…


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


  • 5.  RE: Node to String

    Posted 06/02/09 02:13 PM

    Try using the PSUtilities.stream:streamToString service, map the node to the input “stream” and see if that will convert the incoming data to string.


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