webMethods

webMethods

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

Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

  • 1.  Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

    Posted Mon July 01, 2013 11:17 AM

    Hi,

    I have below requirement.

    My input file is having valid and invalid xml messages. Using node iterator, i am writing valid messages to one file and invalid messages to another file. The issue here is when IS service recieves unstructured xml data(Ex;syntax errors)
    pub.xml:xmlNodeToDocument is failing due to which it is going to catch block and it is stopping the further execution process. Is there anyway to handle this situation other than putting inner try/catch to pub.xml:xmlNodeToDocument service alone. pub.xml:xmlNodeToDocument should not stop the process.

    Ragards,
    Satish Devineni


    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

    Posted Mon July 01, 2013 12:16 PM

    Yes you can put a multi try/catch sequences in the flow exactly where the xmlnodetodocument is failing and so that it can goes to the catch block and continues with the main flow.

    Did you try put that in place and test it?

    What is your code snippet currently doing with just one try catch sequence?

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

    Posted Mon July 01, 2013 01:10 PM

    Yes,you can handle this situation as RMG Mentioned

    Other way we can do is Identify a common value for Invalid XML and in catch block Branch on same parameter and write to file there it self!!


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

    Posted Tue July 02, 2013 05:18 AM

    Thanks Guys for your suggetions. I have same solution before posting this topic. Just posted for another alternative. It will be good if wM have built in service which handles unstructured xml as well. :slight_smile:


    #webMethods
    #Integration-Server-and-ESB


  • 5.  RE: Failure of "pub.xml:xmlNodeToDocument" for unstructured xml data

    Posted Tue July 02, 2013 11:38 AM

    Glad you got what you want…


    #Integration-Server-and-ESB
    #webMethods