Tried below : added prefix "vfs:" to uri
--------------------------------------
1. <send>
<endpoint>
<address uri="vfs:ftp://username:password@windowsServerIp/output"/>
</endpoint>
</send>
------------------------------------------
Getting different error :
[2018-02-22 15:12:55,315] [EI-Core] ERROR - VFSUtils Cannot get the lock
for the file :
ftp://username":***@"windowsServerIp/output/1BCBD64DB823F3B3FF1519292572868.csv
before processing
org.apache.commons.vfs2.FileSystemException: Could not create file
"ftp://username:
***@windowsServerIp/output/1BCBD64DB823F3B3FF1519292572868.csv.lock".
To resolve this I tried adding below line in my proxy.But still getting
same error.
<parameter name="transport.vfs.Locking">disable</parameter>
Please Guide.
With Regards,
Aditya
On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
[email protected]> wrote:
> I wrote a application which is now able to poll files from "input" folder
> on my local machine and put the esb processed files in "output folder" on
> my local machine.
>
> Code which worked for me for Flatfile(putting processed files to folder on
> local machine) is below
>
> <?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>
> <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"/>
> <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="ftp://username:password@
> windowsServerIp/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>
>
>
> I am trying to modify it to write files in an "output" folder on a windows
> server, to which I have access. But it is not working for me.
> I tried changing the send block few times like below.
> --------------------------------------
> 1. <send>
> <endpoint>
> <address uri="ftp://username:password@windowsServerIp/output"/>
> </endpoint>
> </send>
> ------------------------------------------
> 2.
> <send>
> <endpoint>
> <address uri="ftp://username:password@
> windowsServerIp/D:/output"/>
> </endpoint>
> </send>
> ----------------------------------------------
>
> In above send block while running the code , I replaced below keys like
>
> username : my username for windows server , with which I can connect to
> windows using ftp protocol in filezilla
>
> password : my password for windows server , with which I can connect to
> windows using ftp protocol in filezilla
>
> windowsServerIp : Ip of windows service machine.
>
> Please guide.
>
> With Regards,
> Aditya
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev