For the req1, the schema depends on the type of the flatfile (delimited, fixed length etc…). There are samples in WmFlatfileSamples packages…for all the types of schema…you can may be take a look there and try to construct one which suits your req.
For req2, you can use the pub.xml:xmlStringToXmlNode and then pub.xml:xmlNodeToDocument to get a wM Doc…once you get that …you can write a map service to map the doc values to assemble your flatfile.
Again, I am not sure if there is any other optimum way to achieve this.
i’m having a flat file with eid and ename as records.
Now i have to read the flatfile and store the data into an sql database and the i have to read the data from the database and then i have to convert it into xml format.
i’m able to do the xml part but the problem is how to store the data into database and while retrieval i’m getting the eid in form of integer datatype because of this i’m unable to map it to the output xml doc.
when u are retriving the data from the database using select adapter service ,u need to specify the output datatype as string .Then u can map the result to your document and convert it to xml.
HTH
sri