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
  • 1.  XML format with documentToRecord

    Posted Thu May 02, 2002 10:41 AM

    Hi,

    I receive the following document as a string:

    IPP102x
    Invalid format
    IPP205d
    Bad Invoice Number

    I then invoke the stringToDocument

    Then, when I invoke the documentToRecord service, my document looks like this:

    IPP102x IPP205d Invalid format Bad Invoice Number

    In my Invoice record definition, my ERROR and ERRORMESSAGE tags are defined as string list.

    Is there a way to keep the original format?

    Thanks.


    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 2.  RE: XML format with documentToRecord

    Posted Thu May 02, 2002 11:33 AM

    Try defining your invoice record like this:

    Invoice (record list)
    error (string)
    errormessage(string)

    This will keep the relationship between error and errormessage intact.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 3.  RE: XML format with documentToRecord

    Posted Thu May 02, 2002 11:58 AM

    I must really be out of it. The record structure I specified is totally wrong. Working on the correct structure…


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 4.  RE: XML format with documentToRecord

    Posted Thu May 02, 2002 12:30 PM

    Sorry, but my response couldn’t be more wrong. I need to remember to engage the brain for pressing the keys.

    If you wish to keep the current XML structure:

    • Using string lists, as you’ve already seen, collects all data for the same tag name into a single list. The order of the entries appears to be preserved. Thus, entry 0 in ERROR corresponds to entry 0 in ERRORMESSAGE and so on. I’m not certain that maintaing entry order is guaranteed so you may want to test thoroughly.

    If you can change the XML structure, you may want to consider using:

    IPP102x Invalid format IPP205d Bad Invoice Number

    Then your record definition would be

    Invoice (record)

    • ERROR (record list)
      …- CODE (string)
      …- MESSAGE (string)

    and documentToRecord will parse create what you need. Hope this helps.


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods