webMethods step by step XML to Flat file
Task: XML to Flat file
Platform: webMethods 6.1
First create a dictionary for the flat file,
then create xml document.
create flat file schema with the dictionary.
from the flat file schema create a schemaDT by clicking on the SET properties and give the dictionary path.
In the main flow service put the following service.
In this give the xml file name, load as âbytes.
put pub.xml.XMLnodeToDocument in that map the document with the reference xmldocument.
put the Map flow step and map the xmldocument elements with the schemaDT elements.
put pub.flatfile:convertToString in that map the schemaDT file to the document and give the schema path.
put sample.IO.test:writeToFile, map the string to filecontent and give the filename and overwriteFlag and overwrite.