Respected Sir/Madam,

I am able to achieve below file processing using vfs, and datamapper. But
when trying to process files more than size of 8 MB or more the flow is
failing with out of memory. Please guide

step 1. I am using vfs to read one xml file from one location.
step 2. Then using datamapper to convert the xml file to csv.
step 3. Then writing the converted output to another location.


<?xml version="1.0" encoding="UTF-8"?>
<proxy name="FlatFileProxy" startOnLoad="true" transports="vfs" xmlns="
http://ws.apache.org/ns/synapse";>
    <target>
        <inSequence>
            <log level="custom">
                <property name="property_name" value="&quot;Inside FlatFile
***************************************** &quot;"/>
            </log>
            <property name="FORCE_SC_ACCEPTED" scope="axis2" type="STRING"
value="true"/>
            <property name="REST_URL_POSTFIX" scope="axis2" type="STRING"
value=""/>
            <datamapper config="gov:datamapper/xmlToCsv1.dmc"
inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML"
outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json" outputType="CSV"/>
            <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"/>
            <property action="remove" name="LAST_MODIFIED"
scope="transport"/>
            <send>
                <endpoint>
                    <address uri="vfs:file:///C:/Flatfile/output"/>
                </endpoint>
            </send>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
    <parameter name="transport.PollInterval">50ms</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.Locking">disable</parameter>
    <parameter
name="transport.vfs.MoveAfterProcess">file:///C:/Flatfile/orgFilesProcessedSuccessfully</parameter>
</proxy>


sometimes it is not able to delete .lock files from input folder.
sometimes timeout error.

etc..

Sample input attached.

With regards,
Aditya
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to