In the FlatFile Schema it self create a header record with corresponding FieldDefinitions and mention these
OrderDate,ShipDate,OrderNbr,CustPoNbr… and in the mapping setValue default values (“OrderDate”,“ShipDate”,“OrderNbr”,“CustPoNbr”).So these rows will be detail records
2004/04/05",“2004/04/06”,416895,“CT00001153”
“2004/04/05”,“2004/04/06”,416895,“CT00001153”
“2004/04/05”,“2004/04/06”,416912,“CB00001842”
And make sure the number of header fields corresponds the detail fields so that they will be underneath the corresponding headers.
Finally the WmFlatFile (convertToString)service based on the above created schema it will show as you expected.
“OrderDate”,“ShipDate”,“OrderNbr”,“CustPoNbr”
2004/04/05",“2004/04/06”,416895,“CT00001153”
“2004/04/05”,“2004/04/06”,416895,“CT00001153”
“2004/04/05”,“2004/04/06”,416912,“CB00001842”
Test this scenario,and hopefully this will work.
HTH,
#Flow-and-Java-services#webMethods#Integration-Server-and-ESB