Hi Sir, My issue is first line in Expected Output which contains the keys(column headers): "author,id,title,genre,price,publish_date,description"
is missing in current output file. Please guide. With Regards, Aditya On Wed, Feb 21, 2018 at 2:15 PM, aditya shivankar < [email protected]> wrote: > Hi Sir, > > I am using Datamapper for transformation of input request(xml) to output > format(csv) . But in the output format(csv) the column headers are missing > . Please guide how to generate those in output file. > > Sample Input : > > <?xml version="1.0"?> > <catalog> > <book id="bk101"> > <author>Gambardella Matthew</author> > <title>XML Developer's Guide</title> > <genre>Computer</genre> > <price>44.95</price> > <publish_date>2000-10-01</publish_date> > <description>Epic1</description> > </book> > <book id="bk102"> > <author>Ralls Kim</author> > <title>Midnight Rain</title> > <genre>Fantasy</genre> > <price>5.95</price> > <publish_date>2000-12-16</publish_date> > <description>Epic2</description> > </book> > </catalog> > > Expected Output : > author,id,title,genre,price,publish_date,description > Gambardella Matthew,bk101,XML Developer's Guide,Computer,44.95,2000-10- > 01,Epic1 > Ralls Kim,bk102,Midnight Rain,Fantasy,5.95,2000-12-16,Epic2 > > Current Output : > > Gambardella, Matthew,bk101,XML Developer's Guide,Computer,44.95,2000-10- > 01,Epic1 > Ralls, Kim,bk102,Midnight Rain,Fantasy,5.95,2000-12-16,Epic2 > > proxy service : > > <?xml version="1.0" encoding="UTF-8"?> > <proxy name="StockQuoteProxy" startOnLoad="true" transports="vfs" xmlns=" > http://ws.apache.org/ns/synapse"> > <target> > <inSequence> > <log level="full"> > <property name="property_name" value="Read from file > -----------------------"/> > </log> > <datamapper config="gov:datamapper/xmlToCsv1.dmc" > inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML" > outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json" > outputType="CSV"/> > <log level="full"> > <property name="property_name" value="after enrich > -----------------------"/> > </log> > <property expression="fn:concat(fn: > substring-after(get-property('MessageID'), 'urn:uuid:'), '.csv')" > name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/> > <property name="OUT_ONLY" scope="default" type="STRING" > value="true"/> > <property name="messageType" scope="axis2" type="STRING" > value="application/csv"/> > <send> > <endpoint> > <address uri="vfs:file:///C:/Flatfile/output"/> > </endpoint> > </send> > </inSequence> > <outSequence/> > <faultSequence/> > </target> > <parameter name="transport.PollInterval">15</parameter> > <parameter name="transport.vfs.FileURI">file:///C:/Flatfile/input</ > parameter> > <parameter name="transport.vfs.ContentType">application/xml</ > parameter> > <parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter> > <parameter name="transport.vfs.MoveAfterFailure">file:///C:/ > Flatfile/failure</parameter> > <parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter> > <parameter name="transport.vfs.FileNamePattern">.*\.xml</parameter> > <parameter name="transport.vfs.MoveAfterProcess">file:///C:/Flatfile/ > orgFilesProcessedSuccessfully</parameter> > </proxy> > > > Please find attachments for datamapper. > Please guide. > > Thanks and Regards, > Aditya >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
