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.  Query regarding pubwebdocumentToRecord

    Posted 08/25/04 02:04 PM

    Hi,
    I have an XML document (see example below) that I would like to map to a record structure. I’ve tried doing pub.web:stringToDocument (convert XML to node) and then pub.web:documentToRecord (convert node to record).
    It seems that only the last <member> element (i.e. name = “grade”) is mapped onto the record but not the other <member> elements (where name == “studentId”, “subjectId”, “subjectName”, “score”). Any clues how to resolve this problem?

    <?xml version=‘1.0’?>
    <methodResponse>
    <params>
    <param>
    <value><array><data>
    <value><struct>
    <member>
    <name>studentId</name>
    <value><string>S200208</string></value>
    </member>
    <member>
    <name>subjectId</name>
    <value><int>500</int></value>
    </member>
    <member>
    <name>subjectName</name>
    <value><string>HISTORY</string></value>
    </member>
    <member>
    <name>score</name>
    <value><double>85.0</double></value>
    </member>
    <member>
    <name>grade</name>
    <value><string>A+</string></value>
    </member>
    </struct></value>
    </data></array></value>
    </param>
    </params>
    </methodResponse>

    regards…
    Victor


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


  • 2.  RE: Query regarding pubwebdocumentToRecord

    Posted 08/25/04 02:38 PM

    Hello Victor,

    Could you please let us know what are the other parameters that you have set for pub.web:documentToRecord and pub.web:stringToDocument. This I am asking because without any parameters being set, it works properly, with all the elements being displayed.

    -Rajesh Rao


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


  • 3.  RE: Query regarding pubwebdocumentToRecord

    Posted 08/25/04 02:59 PM

    Victor,

    I hope you have created IS document type for methodResponse in webMethods Developer/Integrator tool.

    So once you are done with stringToDocument step in the next follow step
    documentToRecord (set these params makeArrays=false and also set recordName(folder.subfolder:methodResponse)fully qualified record Name and map the output boundNode to a recordReference (methodResponse).

    And step thru the flow and see the results tab after the documentToRecord step,you should see all the <memeber>iterations in the methodResponse record.

    let us know the results.

    HTH,
    RMG


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


  • 4.  RE: Query regarding pubwebdocumentToRecord

    Posted 08/26/04 05:11 AM

    Thanks all. This works fine now.
    I had originally created a record structure that consists of 5 “member” records. This didn’t map correctly from the XML.
    So I created a “member” recordlist and this works now.

    Cheers…
    Victor


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