Re: [Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread Prabushi Samarakoon
Hi Aditya,

At the vfs code level, we first create the output file [1]

and
then write content to that created file [2]
.
Therefore, you need to have all create/write/append permission for the
response file. Please check your permission at the out directory as
mentioned above.

Thanks,
Prabushi

[1] - https://github.com/wso2/wso2-synapse/blob/master/
modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/
VFSTransportSender.java#L292
[2] - https://github.com/wso2/wso2-synapse/blob/master/
modules/transports/core/vfs/src/main/java/org/apache/synapse/transport/vfs/
VFSTransportSender.java#L367

On Thu, Feb 22, 2018 at 3:30 PM, Chanika Geeganage  wrote:

> Hi Aditya,
>
> You need to have write access to this folder to create a file. Can you
> check the permissions given for the user in this location. And also to find
> out the absolute path in windows for FTP, [1] might be helpful.
>
> [1] https://superuser.com/questions/1103547/how-to-form-
> ftp-url-using-absolute-path-in-windows
>
> Thanks
>
> On Thu, Feb 22, 2018 at 3:24 PM, aditya shivankar <
> shivankar.adit...@gmail.com> wrote:
>
>>
>> I am able to access the remote folder using same credentials and ftp
>> protocol in Filezilla.
>> Since I am using the same credentials , I think I have the permissions.
>>
>> With Regards,
>> Aditya
>>
>> On Thu, Feb 22, 2018 at 3:15 PM, Himasha Guruge 
>> wrote:
>>
>>> Hi Aditya,
>>>
>>> Please note below extraction from [1]. Therefore make sure proper
>>> permissions are set. Are you receiving any error logs on this?
>>>
>>>  "When you transfer a file to a remote FTP location via VFS, the ESB
>>> tries to detect the FTP location by navigating from the root folder first.
>>> If the ESB does not  have  at least list permission  to the root (/), the
>>> file transfer fails."
>>>
>>>
>>> [1] https://docs.wso2.com/display/EI611/VFS+Transport
>>>
>>> Thanks,
>>> Himasha
>>>
>>> On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
>>> shivankar.adit...@gmail.com> 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

 
 >>> xmlns="http://ws.apache.org/ns/synapse";>
 
 
 
 
 
 >>> type="STRING" value="true"/>
 >>> type="STRING" value=""/>
 >>> inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json"
 inputType="XML" outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json"
 outputType="CSV"/>
 
 
 
 >>> name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
 >>> value="true"/>
 >>> value="application/csv"/>
 
 
 ftp://username:password@w
 indowsServerIp/output"/>
 
 
 
 
 
 
 15
 f
 ile:///C:/Flatfile/input
 application/xml
 MOVE
 file:///C:/Flatfile/failure
 MOVE
 .*\.xml
 file:///C:/Flatfile/orgFilesProcessedSuccessfully
 


 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. 
   
   ftp://username:password@w
 indowsServerIp/output"/>
   
   
 --
 2.
 
   
   ftp://username:password@w
 indowsServerIp/D:/output"/>
   
 
 --

 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
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


>>>
>>>
>>> --
>>> Himasha Guruge
>>> Senior Software Engineer
>>> WS*O2* *Inc.*
>>> Mobi

Re: [Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread Chanika Geeganage
Hi Aditya,

You need to have write access to this folder to create a file. Can you
check the permissions given for the user in this location. And also to find
out the absolute path in windows for FTP, [1] might be helpful.

[1]
https://superuser.com/questions/1103547/how-to-form-ftp-url-using-absolute-path-in-windows

Thanks

On Thu, Feb 22, 2018 at 3:24 PM, aditya shivankar <
shivankar.adit...@gmail.com> wrote:

>
> I am able to access the remote folder using same credentials and ftp
> protocol in Filezilla.
> Since I am using the same credentials , I think I have the permissions.
>
> With Regards,
> Aditya
>
> On Thu, Feb 22, 2018 at 3:15 PM, Himasha Guruge  wrote:
>
>> Hi Aditya,
>>
>> Please note below extraction from [1]. Therefore make sure proper
>> permissions are set. Are you receiving any error logs on this?
>>
>>  "When you transfer a file to a remote FTP location via VFS, the ESB
>> tries to detect the FTP location by navigating from the root folder first.
>> If the ESB does not  have  at least list permission  to the root (/), the
>> file transfer fails."
>>
>>
>> [1] https://docs.wso2.com/display/EI611/VFS+Transport
>>
>> Thanks,
>> Himasha
>>
>> On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
>> shivankar.adit...@gmail.com> 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
>>>
>>> 
>>> http://ws.apache.org/ns/synapse";>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> type="STRING" value="true"/>
>>> >> type="STRING" value=""/>
>>> >> inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML"
>>> outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json"
>>> outputType="CSV"/>
>>> 
>>> 
>>> 
>>> >> name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
>>> >> value="true"/>
>>> >> value="application/csv"/>
>>> 
>>> 
>>> ftp://username:password@w
>>> indowsServerIp/output"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 15
>>> f
>>> ile:///C:/Flatfile/input
>>> application/xml
>>> MOVE
>>> file:///C:/Flatfile/failure
>>> MOVE
>>> .*\.xml
>>> file:///C:/Flatfile/orgFilesProcessedSuccessfully
>>> 
>>>
>>>
>>> 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. 
>>>   
>>>   ftp://username:password@w
>>> indowsServerIp/output"/>
>>>   
>>>   
>>> --
>>> 2.
>>> 
>>>   
>>>   ftp://username:password@w
>>> indowsServerIp/D:/output"/>
>>>   
>>> 
>>> --
>>>
>>> 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
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Himasha Guruge
>> Senior Software Engineer
>> WS*O2* *Inc.*
>> Mobile: +94 777459299 <+94%2077%20745%209299>
>> himas...@wso2.com
>>
>
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Best Regards..

Chanika Geeganage
+94773522586
WSO2, Inc.; http://wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread aditya shivankar
I am able to access the remote folder using same credentials and ftp
protocol in Filezilla.
Since I am using the same credentials , I think I have the permissions.

With Regards,
Aditya

On Thu, Feb 22, 2018 at 3:15 PM, Himasha Guruge  wrote:

> Hi Aditya,
>
> Please note below extraction from [1]. Therefore make sure proper
> permissions are set. Are you receiving any error logs on this?
>
>  "When you transfer a file to a remote FTP location via VFS, the ESB tries
> to detect the FTP location by navigating from the root folder first. If the
> ESB does not  have  at least list permission  to the root (/), the file
> transfer fails."
>
>
> [1] https://docs.wso2.com/display/EI611/VFS+Transport
>
> Thanks,
> Himasha
>
> On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
> shivankar.adit...@gmail.com> 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
>>
>> 
>> http://ws.apache.org/ns/synapse";>
>> 
>> 
>> 
>> 
>> 
>> > type="STRING" value="true"/>
>> > value=""/>
>> > inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML"
>> outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json"
>> outputType="CSV"/>
>> 
>> 
>> 
>> > name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
>> > value="true"/>
>> > value="application/csv"/>
>> 
>> 
>> ftp://username:password@w
>> indowsServerIp/output"/>
>> 
>> 
>> 
>> 
>> 
>> 
>> 15
>> f
>> ile:///C:/Flatfile/input
>> application/xml
>> MOVE
>> file:///C:/Flatfile/
>> failure
>> MOVE
>> .*\.xml
>> file:///C:/Flatfile/orgFilesProcessedSuccessfully
>> 
>>
>>
>> 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. 
>>   
>>   ftp://username:password@windowsServerIp/output"/>
>>   
>>   
>> --
>> 2.
>> 
>>   
>>   ftp://username:password@w
>> indowsServerIp/D:/output"/>
>>   
>> 
>> --
>>
>> 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
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Himasha Guruge
> Senior Software Engineer
> WS*O2* *Inc.*
> Mobile: +94 777459299
> himas...@wso2.com
>
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread aditya shivankar
Tried below : added prefix "vfs:" to uri
--
1. 
  
ftp://username:password@windowsServerIp/output"/>

 
  
--
 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.

disable

Please Guide.

With Regards,
Aditya

On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
shivankar.adit...@gmail.com> 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
>
> 
> http://ws.apache.org/ns/synapse";>
> 
> 
> 
> 
> 
>  value="true"/>
>  value=""/>
>  inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML"
> outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json"
> outputType="CSV"/>
> 
> 
> 
>  name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
>  value="true"/>
>  value="application/csv"/>
> 
> 
> ftp://username:password@
> windowsServerIp/output"/>
> 
> 
> 
> 
> 
> 
> 15
> file:///C:/Flatfile/input parameter>
> application/xml parameter>
> MOVE
> file:///C:/
> Flatfile/failure
> MOVE
> .*\.xml
> file:///C:/Flatfile/
> orgFilesProcessedSuccessfully
> 
>
>
> 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. 
>   
>   ftp://username:password@windowsServerIp/output"/>
>   
>   
> --
> 2.
> 
>   
>   ftp://username:password@
> windowsServerIp/D:/output"/>
>   
> 
> --
>
> 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
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread Himasha Guruge
Hi Aditya,

Please note below extraction from [1]. Therefore make sure proper
permissions are set. Are you receiving any error logs on this?

 "When you transfer a file to a remote FTP location via VFS, the ESB tries
to detect the FTP location by navigating from the root folder first. If the
ESB does not  have  at least list permission  to the root (/), the file
transfer fails."


[1] https://docs.wso2.com/display/EI611/VFS+Transport

Thanks,
Himasha

On Thu, Feb 22, 2018 at 2:30 PM, aditya shivankar <
shivankar.adit...@gmail.com> 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
>
> 
> http://ws.apache.org/ns/synapse";>
> 
> 
> 
> 
> 
>  value="true"/>
>  value=""/>
>  inputSchema="gov:datamapper/xmlToCsv1_inputSchema.json" inputType="XML"
> outputSchema="gov:datamapper/xmlToCsv1_outputSchema.json"
> outputType="CSV"/>
> 
> 
> 
>  name="transport.vfs.ReplyFileName" scope="transport" type="STRING"/>
>  value="true"/>
>  value="application/csv"/>
> 
> 
> ftp://username:password@
> windowsServerIp/output"/>
> 
> 
> 
> 
> 
> 
> 15
> file:///C:/Flatfile/input parameter>
> application/xml parameter>
> MOVE
> file:///C:/
> Flatfile/failure
> MOVE
> .*\.xml
> file:///C:/Flatfile/
> orgFilesProcessedSuccessfully
> 
>
>
> 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. 
>   
>   ftp://username:password@windowsServerIp/output"/>
>   
>   
> --
> 2.
> 
>   
>   ftp://username:password@
> windowsServerIp/D:/output"/>
>   
> 
> --
>
> 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
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Himasha Guruge
Senior Software Engineer
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] Not able to write esb processed file to a folder at remote location. Please guide.

2018-02-22 Thread aditya shivankar
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


http://ws.apache.org/ns/synapse";>
















ftp://username:password@windowsServerIp
/output"/>






15
file:///C:/Flatfile/input
application/xml
MOVE
file:///C:/Flatfile/failure
MOVE
.*\.xml
file:///C:/Flatfile/orgFilesProcessedSuccessfully



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. 
  
  ftp://username:password@windowsServerIp/output"/>
  
  
--
2.

  
  ftp://username:password@windowsServerIp/D:/output"/>
  

--

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
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev