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?
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.
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.
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.