You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com> on 2009/11/17 04:43:17 UTC

FTP Poller component

Hi All,
 
I am trying to use ftp:poller component of servicemix.
 
The requirement is very simple:
Download a file from FTP Server to the local system and send a JBI message to another service unit.
I am expecting the message to carry information regarding where the file was downloaded, so that I can take it up for processing in the bean.
 
I deploy the service assembly and the Deployment was successful. But nothing happens after that.
I am expecting to see my System.out statement printed on the console.
I even enabled DEBUG, hoping to see some useful message. But no interesting messages there.
 
I am using 2 components for this purpose. Files in the FTP Server location are XML.
Can any of you help me in this?
 
1. FTP Poller <ftp:poller>:
 
xbean.xml :
...
<ftp:poller service="mediations:file"
             endpoint="MyFTPPollerEndpoint"
             targetService="mediations:fileListenerService"
             uri=ftp://me:me@myftpserver/test" />
 
2. Listener Bean <bean:endpoint> and <bean>:
 
xbean.xml:
...
  <bean:endpoint service="mediations:fileListenerService" endpoint="MyListenerEndpoint" bean="#listener"/>
 
  <bean id="listener" class="com.test.MyFileListener"/>
 
MyFileListener.java
 
....
public class MyFileListener implements MessageExchangeListener {
 
    @Resource
    private DeliveryChannel channel;
 
    public void onMessageExchange(MessageExchange exchange) throws MessagingException
    {
      System.out.println("############################## Received exchange: " + exchange);
      exchange.setStatus(ExchangeStatus.DONE);
      channel.send(exchange);
    }
}
 
Thanks for your help in advance
Ramu 
 

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Hi All,

I tried to run my stand alone FTP client's code in servicemix context. It started failing again.

On debugging, I found out that the call to FTPClient.setReaderThread was never returning back. (This never happened in stand alone client execution)

I don't know the purpose of this call. (I had just used it from some examples in the net). On removing this everything started working fine.

Can anyone explain whats the real purpose of this method? I looked into commons-net code and found this place where the readerThread variable is getting used... 

    protected void _connectAction_() throws IOException
    {
        super._connectAction_();
        InputStream input;
        TelnetInputStream tmp;

        if (FromNetASCIIInputStream.isConversionRequired())
            input = new FromNetASCIIInputStream(_input_);
        else
            input = _input_;


        tmp = new TelnetInputStream(input, this, readerThread);
        if(readerThread)
        {
            tmp._start();
        }
        // __input CANNOT refer to the TelnetInputStream.  We run into
        // blocking problems when some classes use TelnetInputStream, so
        // we wrap it with a BufferedInputStream which we know is safe.
        // This blocking behavior requires further investigation, but right
        // now it looks like classes like InputStreamReader are not implemented
        // in a safe manner.
        __input = new BufferedInputStream(tmp);
        __output = new ToNetASCIIOutputStream(new TelnetOutputStream(this));
    }


It looks like some bug in InputStream. Has it been taken care in commons-net 2.0 ? Or later versions?

Regards,
Ramu

-----Original Message-----
From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com] 
Sent: Friday, November 20, 2009 8:34 AM
To: users@servicemix.apache.org
Subject: RE: FTP Poller component


Gert,

Here are the logs from the server ...

Core FTP Server log
------------------- 
[20091120 08:23:01] [10.143.68.226] connected  
[20091120 08:23:01] [omc] USER omc success 
[20091120 08:23:01] [omc] PASS ********* success 
[20091120 08:23:01] [omc] TYPE I success 
[20091120 08:23:01] [omc] NOOP success 
[20091120 08:23:01] [omc] CWD  success 
[20091120 08:23:01] [omc] NOOP success 
[20091120 08:23:01] [omc] SYST success 
[20091120 08:23:02] [omc] PORT 10,143,68,226,13,67 success 
[20091120 08:23:02] [omc] LIST  success 
[20091120 08:23:02] [omc] NOOP success 
[20091120 08:23:02] [omc] PORT 10,143,68,226,13,69 success 
[20091120 08:23:02] [omc] LIST . success 
[20091120 08:23:06] [omc] NOOP success 
[20091120 08:23:06] [omc] PORT 10,143,68,226,13,71 success 
[20091120 08:23:06] [omc] LIST  success 
[20091120 08:23:11] [omc] NOOP success 
.....

CoreFTPServer is also available in free version supporting FTP

Some more additional things I have tried

- I was able to do all operations on the CoreFTPServer using WinSCP, a free Graphical FTP client
- I used commons-net library and wrote a simple java program. It works fine with the same instance of CoreFTPServer (with which Servicemix's ftp:poller was failing to download files)

Thanks for the help.

Regards,
Ramu

-----Original Message-----
From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com] 
Sent: Friday, November 20, 2009 3:58 AM
To: users@servicemix.apache.org
Subject: Re: FTP Poller component

Ramu,

Is there an access log or something on that FTP server that you could
post an excerpt from to this mailing list?  It would be very
interesting to see what the FTP commands are that ServiceMix is
sending and how the server is responding to them.

Is that server software freely available for download so we can test
things ourselves?  From looking at their website, I couldn't really
figure that out.  Btw, the website seems to focus a lot on the SFTP
function, is it perhaps configured to disallow some operations over
plain FTP?

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/18 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Forgot to mention that the ftp user I am using are not system users, they are virtual ftp users created/configured in the ftp server.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com]
> Sent: Wednesday, November 18, 2009 8:20 AM
> To: users@servicemix.apache.org
> Subject: RE: FTP Poller component
>
> Hi Gert,
>
> I have not left out any debug messages. Even with deleteFile="true", the 'Scheduled file ...' and 'Processing file ...' messages repeat in the console.
>
> I have been trying out this with CoreFTP Server running on windows. Where I have created a new domain and added one user (Please see attachments for details.
> Please let me know any additional configurations to be done in FTP server.
>
> Thanks for the help.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com]
> Sent: Wednesday, November 18, 2009 2:28 AM
> To: users@servicemix.apache.org
> Subject: Re: FTP Poller component
>
> L.S.,
>
> Normally, the 'Processing file ...' line should be followed by output
> from the MessageExchanges being sent with the FTP file payload?  Are
> you not seeing those or have they been left out of the post for
> brevity?
>
> The 'Skipping ...' line sometimes occurs during normal processing when
> a file has been scheduled for processing more than once before it is
> actually being handled.  When the first processing is done, the file
> is being deleted from the server so any subsequent scheduled tasks
> will just end because they no longer see the file on the server.
> However, in your original xbean.xml posts, the deleteFile='false' flag
> was configured on the poller endpoint?  Did you see this behavior with
> that flag enabled?
>
> If that is the case, there might be an issue with the FTP server
> you're using.  Some FTP server daemons require additional
> configuration, so if you're experiencing more problems it might be
> helpful to know which server software you're running.
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
>> Hi,
>>
>> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>>
>> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
>> DEBUG - FtpComponent                   - Processing file /test.xml
>>
>> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>>
>> I failed to notice the above line earlier, I have verified that the file exists on the server
>>
>>
>> Regards,
>> Ramu
>>
>> As you are running on a windows box... Try this url for ur sender..
>>
>>     <file:sender service="mediations:cdrFileSenderService"
>>                        endpoint="cdrFileSenderEndpoint"
>>            directory="file:///c:/temp <file:///c:/temp> " />
>>
>>
>>
>

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Gert,

Here are the logs from the server ...

Core FTP Server log
------------------- 
[20091120 08:23:01] [10.143.68.226] connected  
[20091120 08:23:01] [omc] USER omc success 
[20091120 08:23:01] [omc] PASS ********* success 
[20091120 08:23:01] [omc] TYPE I success 
[20091120 08:23:01] [omc] NOOP success 
[20091120 08:23:01] [omc] CWD  success 
[20091120 08:23:01] [omc] NOOP success 
[20091120 08:23:01] [omc] SYST success 
[20091120 08:23:02] [omc] PORT 10,143,68,226,13,67 success 
[20091120 08:23:02] [omc] LIST  success 
[20091120 08:23:02] [omc] NOOP success 
[20091120 08:23:02] [omc] PORT 10,143,68,226,13,69 success 
[20091120 08:23:02] [omc] LIST . success 
[20091120 08:23:06] [omc] NOOP success 
[20091120 08:23:06] [omc] PORT 10,143,68,226,13,71 success 
[20091120 08:23:06] [omc] LIST  success 
[20091120 08:23:11] [omc] NOOP success 
.....

CoreFTPServer is also available in free version supporting FTP

Some more additional things I have tried

- I was able to do all operations on the CoreFTPServer using WinSCP, a free Graphical FTP client
- I used commons-net library and wrote a simple java program. It works fine with the same instance of CoreFTPServer (with which Servicemix's ftp:poller was failing to download files)

Thanks for the help.

Regards,
Ramu

-----Original Message-----
From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com] 
Sent: Friday, November 20, 2009 3:58 AM
To: users@servicemix.apache.org
Subject: Re: FTP Poller component

Ramu,

Is there an access log or something on that FTP server that you could
post an excerpt from to this mailing list?  It would be very
interesting to see what the FTP commands are that ServiceMix is
sending and how the server is responding to them.

Is that server software freely available for download so we can test
things ourselves?  From looking at their website, I couldn't really
figure that out.  Btw, the website seems to focus a lot on the SFTP
function, is it perhaps configured to disallow some operations over
plain FTP?

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/18 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Forgot to mention that the ftp user I am using are not system users, they are virtual ftp users created/configured in the ftp server.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com]
> Sent: Wednesday, November 18, 2009 8:20 AM
> To: users@servicemix.apache.org
> Subject: RE: FTP Poller component
>
> Hi Gert,
>
> I have not left out any debug messages. Even with deleteFile="true", the 'Scheduled file ...' and 'Processing file ...' messages repeat in the console.
>
> I have been trying out this with CoreFTP Server running on windows. Where I have created a new domain and added one user (Please see attachments for details.
> Please let me know any additional configurations to be done in FTP server.
>
> Thanks for the help.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com]
> Sent: Wednesday, November 18, 2009 2:28 AM
> To: users@servicemix.apache.org
> Subject: Re: FTP Poller component
>
> L.S.,
>
> Normally, the 'Processing file ...' line should be followed by output
> from the MessageExchanges being sent with the FTP file payload?  Are
> you not seeing those or have they been left out of the post for
> brevity?
>
> The 'Skipping ...' line sometimes occurs during normal processing when
> a file has been scheduled for processing more than once before it is
> actually being handled.  When the first processing is done, the file
> is being deleted from the server so any subsequent scheduled tasks
> will just end because they no longer see the file on the server.
> However, in your original xbean.xml posts, the deleteFile='false' flag
> was configured on the poller endpoint?  Did you see this behavior with
> that flag enabled?
>
> If that is the case, there might be an issue with the FTP server
> you're using.  Some FTP server daemons require additional
> configuration, so if you're experiencing more problems it might be
> helpful to know which server software you're running.
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
>> Hi,
>>
>> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>>
>> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
>> DEBUG - FtpComponent                   - Processing file /test.xml
>>
>> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>>
>> I failed to notice the above line earlier, I have verified that the file exists on the server
>>
>>
>> Regards,
>> Ramu
>>
>> As you are running on a windows box... Try this url for ur sender..
>>
>>     <file:sender service="mediations:cdrFileSenderService"
>>                        endpoint="cdrFileSenderEndpoint"
>>            directory="file:///c:/temp <file:///c:/temp> " />
>>
>>
>>
>

Re: FTP Poller component

Posted by Gert Vanthienen <ge...@gmail.com>.
Ramu,

Is there an access log or something on that FTP server that you could
post an excerpt from to this mailing list?  It would be very
interesting to see what the FTP commands are that ServiceMix is
sending and how the server is responding to them.

Is that server software freely available for download so we can test
things ourselves?  From looking at their website, I couldn't really
figure that out.  Btw, the website seems to focus a lot on the SFTP
function, is it perhaps configured to disallow some operations over
plain FTP?

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/18 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Forgot to mention that the ftp user I am using are not system users, they are virtual ftp users created/configured in the ftp server.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com]
> Sent: Wednesday, November 18, 2009 8:20 AM
> To: users@servicemix.apache.org
> Subject: RE: FTP Poller component
>
> Hi Gert,
>
> I have not left out any debug messages. Even with deleteFile="true", the 'Scheduled file ...' and 'Processing file ...' messages repeat in the console.
>
> I have been trying out this with CoreFTP Server running on windows. Where I have created a new domain and added one user (Please see attachments for details.
> Please let me know any additional configurations to be done in FTP server.
>
> Thanks for the help.
>
> Regards,
> Ramu
>
> -----Original Message-----
> From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com]
> Sent: Wednesday, November 18, 2009 2:28 AM
> To: users@servicemix.apache.org
> Subject: Re: FTP Poller component
>
> L.S.,
>
> Normally, the 'Processing file ...' line should be followed by output
> from the MessageExchanges being sent with the FTP file payload?  Are
> you not seeing those or have they been left out of the post for
> brevity?
>
> The 'Skipping ...' line sometimes occurs during normal processing when
> a file has been scheduled for processing more than once before it is
> actually being handled.  When the first processing is done, the file
> is being deleted from the server so any subsequent scheduled tasks
> will just end because they no longer see the file on the server.
> However, in your original xbean.xml posts, the deleteFile='false' flag
> was configured on the poller endpoint?  Did you see this behavior with
> that flag enabled?
>
> If that is the case, there might be an issue with the FTP server
> you're using.  Some FTP server daemons require additional
> configuration, so if you're experiencing more problems it might be
> helpful to know which server software you're running.
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
>
> 2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
>> Hi,
>>
>> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>>
>> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
>> DEBUG - FtpComponent                   - Processing file /test.xml
>>
>> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>>
>> I failed to notice the above line earlier, I have verified that the file exists on the server
>>
>>
>> Regards,
>> Ramu
>>
>> As you are running on a windows box... Try this url for ur sender..
>>
>>     <file:sender service="mediations:cdrFileSenderService"
>>                        endpoint="cdrFileSenderEndpoint"
>>            directory="file:///c:/temp <file:///c:/temp> " />
>>
>>
>>
>

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Hi,

Forgot to mention that the ftp user I am using are not system users, they are virtual ftp users created/configured in the ftp server. 

Regards,
Ramu

-----Original Message-----
From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com] 
Sent: Wednesday, November 18, 2009 8:20 AM
To: users@servicemix.apache.org
Subject: RE: FTP Poller component

Hi Gert,

I have not left out any debug messages. Even with deleteFile="true", the 'Scheduled file ...' and 'Processing file ...' messages repeat in the console.

I have been trying out this with CoreFTP Server running on windows. Where I have created a new domain and added one user (Please see attachments for details.
Please let me know any additional configurations to be done in FTP server.

Thanks for the help.

Regards,
Ramu

-----Original Message-----
From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com] 
Sent: Wednesday, November 18, 2009 2:28 AM
To: users@servicemix.apache.org
Subject: Re: FTP Poller component

L.S.,

Normally, the 'Processing file ...' line should be followed by output
from the MessageExchanges being sent with the FTP file payload?  Are
you not seeing those or have they been left out of the post for
brevity?

The 'Skipping ...' line sometimes occurs during normal processing when
a file has been scheduled for processing more than once before it is
actually being handled.  When the first processing is done, the file
is being deleted from the server so any subsequent scheduled tasks
will just end because they no longer see the file on the server.
However, in your original xbean.xml posts, the deleteFile='false' flag
was configured on the poller endpoint?  Did you see this behavior with
that flag enabled?

If that is the case, there might be an issue with the FTP server
you're using.  Some FTP server daemons require additional
configuration, so if you're experiencing more problems it might be
helpful to know which server software you're running.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>
> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
> DEBUG - FtpComponent                   - Processing file /test.xml
>
> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>
> I failed to notice the above line earlier, I have verified that the file exists on the server
>
>
> Regards,
> Ramu
>
> As you are running on a windows box... Try this url for ur sender..
>
>     <file:sender service="mediations:cdrFileSenderService"
>                        endpoint="cdrFileSenderEndpoint"
>            directory="file:///c:/temp <file:///c:/temp> " />
>
>
>

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Hi Gert,

I have not left out any debug messages. Even with deleteFile="true", the 'Scheduled file ...' and 'Processing file ...' messages repeat in the console.

I have been trying out this with CoreFTP Server running on windows. Where I have created a new domain and added one user (Please see attachments for details.
Please let me know any additional configurations to be done in FTP server.

Thanks for the help.

Regards,
Ramu

-----Original Message-----
From: ext Gert Vanthienen [mailto:gert.vanthienen@gmail.com] 
Sent: Wednesday, November 18, 2009 2:28 AM
To: users@servicemix.apache.org
Subject: Re: FTP Poller component

L.S.,

Normally, the 'Processing file ...' line should be followed by output
from the MessageExchanges being sent with the FTP file payload?  Are
you not seeing those or have they been left out of the post for
brevity?

The 'Skipping ...' line sometimes occurs during normal processing when
a file has been scheduled for processing more than once before it is
actually being handled.  When the first processing is done, the file
is being deleted from the server so any subsequent scheduled tasks
will just end because they no longer see the file on the server.
However, in your original xbean.xml posts, the deleteFile='false' flag
was configured on the poller endpoint?  Did you see this behavior with
that flag enabled?

If that is the case, there might be an issue with the FTP server
you're using.  Some FTP server daemons require additional
configuration, so if you're experiencing more problems it might be
helpful to know which server software you're running.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>
> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
> DEBUG - FtpComponent                   - Processing file /test.xml
>
> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>
> I failed to notice the above line earlier, I have verified that the file exists on the server
>
>
> Regards,
> Ramu
>
> As you are running on a windows box... Try this url for ur sender..
>
>     <file:sender service="mediations:cdrFileSenderService"
>                        endpoint="cdrFileSenderEndpoint"
>            directory="file:///c:/temp <file:///c:/temp> " />
>
>
>

Re: FTP Poller component

Posted by Gert Vanthienen <ge...@gmail.com>.
L.S.,

Normally, the 'Processing file ...' line should be followed by output
from the MessageExchanges being sent with the FTP file payload?  Are
you not seeing those or have they been left out of the post for
brevity?

The 'Skipping ...' line sometimes occurs during normal processing when
a file has been scheduled for processing more than once before it is
actually being handled.  When the first processing is done, the file
is being deleted from the server so any subsequent scheduled tasks
will just end because they no longer see the file on the server.
However, in your original xbean.xml posts, the deleteFile='false' flag
was configured on the poller endpoint?  Did you see this behavior with
that flag enabled?

If that is the case, there might be an issue with the FTP server
you're using.  Some FTP server daemons require additional
configuration, so if you're experiencing more problems it might be
helpful to know which server software you're running.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/11/17 Sr, Ramu (NSN - IN/Bangalore) <ra...@nsn.com>:
> Hi,
>
> Thanks for the suggestion, I had tried with these combinations, but still the error is same.
>
> DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
> DEBUG - FtpComponent                   - Processing file /test.xml
>
> DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server
>
> I failed to notice the above line earlier, I have verified that the file exists on the server
>
>
> Regards,
> Ramu
>
> As you are running on a windows box... Try this url for ur sender..
>
>     <file:sender service="mediations:cdrFileSenderService"
>                        endpoint="cdrFileSenderEndpoint"
>            directory="file:///c:/temp <file:///c:/temp> " />
>
>
>

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Hi,

Thanks for the suggestion, I had tried with these combinations, but still the error is same.

DEBUG - FtpComponent                   - Scheduling file /test.xml for processing
DEBUG - FtpComponent                   - Processing file /test.xml

DEBUG - FtpComponent                   - Skipping /test.xml: the file no longer exists on the server

I failed to notice the above line earlier, I have verified that the file exists on the server


Regards,
Ramu

As you are running on a windows box... Try this url for ur sender..
 
     <file:sender service="mediations:cdrFileSenderService" 
                        endpoint="cdrFileSenderEndpoint"
            directory="file:///c:/temp <file:///c:/temp> " />

 

RE: FTP Poller component

Posted by ra...@wipro.com.
As you are running on a windows box... Try this url for ur sender..
 
     <file:sender service="mediations:cdrFileSenderService" 
                        endpoint="cdrFileSenderEndpoint"
            directory="file:///c:/temp <file:///c:/temp> " />

 

________________________________

From: Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com]
Sent: Tue 11/17/2009 2:15 PM
To: users@servicemix.apache.org
Subject: RE: FTP Poller component



Hi All,

I replaced the bean:endpoint with file:sender end point.
Expecting the file to be written to the directory specified in the file:sender

Now, I can see the following DEBUG message from FtpComponent continuously in the console. But the file is not downloaded to the directory

Polling directory /test
Scheduling file test.xml for processing

Can anyone help me in this?

FileSender:
----------
<beans xmlns:file="http://servicemix.apache.org/file/1.0"
        xmlns="http://www.springframework.org/schema/beans"
        xmlns:mediations="http://www.abc.com/sai/mediations" >
                       
        <file:sender service="mediations:cdrFileSenderService" 
                        endpoint="cdrFileSenderEndpoint"
            directory="file:C:/Temp" />
</beans>

FTP Poller:
----------

<beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0"
                xmlns:mediations="http://www.abc.com/sai/mediations"
                xmlns="http://www.springframework.org/schema/beans" >

        <ftp:poller service="mediations:cdrFTPPollerService"
             endpoint="cdrFTPPollerEndpoint"
             targetService="mediations:cdrFileSenderService"
             targetEndpoint="cdrFileSenderEndpoint"
             deleteFile="false"
             uri="ftp://omc:omc@74tk2bs <ftp://omc:omc@74tk2bs/> " />
</beans>

Regards,
Ramu

-----Original Message-----
From: Sr, Ramu (NSN - IN/Bangalore)
Sent: Tuesday, November 17, 2009 10:05 AM
To: 'users@servicemix.apache.org'
Subject: RE: FTP Poller component

An update,

I replaced the older 3.2.3 version with Servicemix 3.3.1 and now I see debug messages "Polling directory /test" repeatedly in my console.
I tried looking into the activities in jconsole. All Services and the endpoints are up and running.

But no notifications are displyed in the bean endpoint/ftp endpoint and ofcourse still the message I am printing from the bean is not visible :(

Servicemix 3.3.1 documentation pointed that the ftp:poller will poll an ftp server, downloads the file and sends a JBI InOnly message to the registered JBI Service.
In my example I am trying to hookup the bean service to the ftp poller so that it can receive the message.
I am surely missing something which I am trying hard to debug :(

Regards,
Ramu

-----Original Message-----
From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com]
Sent: Tuesday, November 17, 2009 9:13 AM
To: users@servicemix.apache.org
Subject: FTP Poller component

Hi All,

I am trying to use ftp:poller component of servicemix.

The requirement is very simple:
Download a file from FTP Server to the local system and send a JBI message to another service unit.
I am expecting the message to carry information regarding where the file was downloaded, so that I can take it up for processing in the bean.

I deploy the service assembly and the Deployment was successful. But nothing happens after that.
I am expecting to see my System.out statement printed on the console.
I even enabled DEBUG, hoping to see some useful message. But no interesting messages there.

I am using 2 components for this purpose. Files in the FTP Server location are XML.
Can any of you help me in this?

1. FTP Poller <ftp:poller>:

xbean.xml :
...
<ftp:poller service="mediations:file"
             endpoint="MyFTPPollerEndpoint"
             targetService="mediations:fileListenerService"
             uri=ftp://me:me@myftpserver/test" />

2. Listener Bean <bean:endpoint> and <bean>:

xbean.xml:
...
  <bean:endpoint service="mediations:fileListenerService" endpoint="MyListenerEndpoint" bean="#listener"/>

  <bean id="listener" class="com.test.MyFileListener"/>

MyFileListener.java

....
public class MyFileListener implements MessageExchangeListener {

    @Resource
    private DeliveryChannel channel;

    public void onMessageExchange(MessageExchange exchange) throws MessagingException
    {
      System.out.println("############################## Received exchange: " + exchange);
      exchange.setStatus(ExchangeStatus.DONE);
      channel.send(exchange);
    }
}

Thanks for your help in advance
Ramu




Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
Hi All,

I replaced the bean:endpoint with file:sender end point.
Expecting the file to be written to the directory specified in the file:sender

Now, I can see the following DEBUG message from FtpComponent continuously in the console. But the file is not downloaded to the directory

Polling directory /test
Scheduling file test.xml for processing

Can anyone help me in this?

FileSender:
----------
<beans xmlns:file="http://servicemix.apache.org/file/1.0" 
        xmlns="http://www.springframework.org/schema/beans" 
        xmlns:mediations="http://www.abc.com/sai/mediations" >
			
        <file:sender service="mediations:cdrFileSenderService" 
			endpoint="cdrFileSenderEndpoint"
            directory="file:C:/Temp" />
</beans> 

FTP Poller:
----------

<beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0" 
		xmlns:mediations="http://www.abc.com/sai/mediations" 
		xmlns="http://www.springframework.org/schema/beans" >

	<ftp:poller service="mediations:cdrFTPPollerService"
             endpoint="cdrFTPPollerEndpoint"
             targetService="mediations:cdrFileSenderService"
             targetEndpoint="cdrFileSenderEndpoint"
             deleteFile="false"
             uri="ftp://omc:omc@74tk2bs" />
</beans>

Regards,
Ramu

-----Original Message-----
From: Sr, Ramu (NSN - IN/Bangalore) 
Sent: Tuesday, November 17, 2009 10:05 AM
To: 'users@servicemix.apache.org'
Subject: RE: FTP Poller component

An update,

I replaced the older 3.2.3 version with Servicemix 3.3.1 and now I see debug messages "Polling directory /test" repeatedly in my console.
I tried looking into the activities in jconsole. All Services and the endpoints are up and running.

But no notifications are displyed in the bean endpoint/ftp endpoint and ofcourse still the message I am printing from the bean is not visible :(

Servicemix 3.3.1 documentation pointed that the ftp:poller will poll an ftp server, downloads the file and sends a JBI InOnly message to the registered JBI Service.
In my example I am trying to hookup the bean service to the ftp poller so that it can receive the message.
I am surely missing something which I am trying hard to debug :(

Regards,
Ramu

-----Original Message-----
From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com] 
Sent: Tuesday, November 17, 2009 9:13 AM
To: users@servicemix.apache.org
Subject: FTP Poller component

Hi All,
 
I am trying to use ftp:poller component of servicemix.
 
The requirement is very simple:
Download a file from FTP Server to the local system and send a JBI message to another service unit.
I am expecting the message to carry information regarding where the file was downloaded, so that I can take it up for processing in the bean.
 
I deploy the service assembly and the Deployment was successful. But nothing happens after that.
I am expecting to see my System.out statement printed on the console.
I even enabled DEBUG, hoping to see some useful message. But no interesting messages there.
 
I am using 2 components for this purpose. Files in the FTP Server location are XML.
Can any of you help me in this?
 
1. FTP Poller <ftp:poller>:
 
xbean.xml :
...
<ftp:poller service="mediations:file"
             endpoint="MyFTPPollerEndpoint"
             targetService="mediations:fileListenerService"
             uri=ftp://me:me@myftpserver/test" />
 
2. Listener Bean <bean:endpoint> and <bean>:
 
xbean.xml:
...
  <bean:endpoint service="mediations:fileListenerService" endpoint="MyListenerEndpoint" bean="#listener"/>
 
  <bean id="listener" class="com.test.MyFileListener"/>
 
MyFileListener.java
 
....
public class MyFileListener implements MessageExchangeListener {
 
    @Resource
    private DeliveryChannel channel;
 
    public void onMessageExchange(MessageExchange exchange) throws MessagingException
    {
      System.out.println("############################## Received exchange: " + exchange);
      exchange.setStatus(ExchangeStatus.DONE);
      channel.send(exchange);
    }
}
 
Thanks for your help in advance
Ramu 
 

RE: FTP Poller component

Posted by "Sr, Ramu (NSN - IN/Bangalore)" <ra...@nsn.com>.
An update,

I replaced the older 3.2.3 version with Servicemix 3.3.1 and now I see debug messages "Polling directory /test" repeatedly in my console.
I tried looking into the activities in jconsole. All Services and the endpoints are up and running.

But no notifications are displyed in the bean endpoint/ftp endpoint and ofcourse still the message I am printing from the bean is not visible :(

Servicemix 3.3.1 documentation pointed that the ftp:poller will poll an ftp server, downloads the file and sends a JBI InOnly message to the registered JBI Service.
In my example I am trying to hookup the bean service to the ftp poller so that it can receive the message.
I am surely missing something which I am trying hard to debug :(

Regards,
Ramu

-----Original Message-----
From: ext Sr, Ramu (NSN - IN/Bangalore) [mailto:ramu.sr@nsn.com] 
Sent: Tuesday, November 17, 2009 9:13 AM
To: users@servicemix.apache.org
Subject: FTP Poller component

Hi All,
 
I am trying to use ftp:poller component of servicemix.
 
The requirement is very simple:
Download a file from FTP Server to the local system and send a JBI message to another service unit.
I am expecting the message to carry information regarding where the file was downloaded, so that I can take it up for processing in the bean.
 
I deploy the service assembly and the Deployment was successful. But nothing happens after that.
I am expecting to see my System.out statement printed on the console.
I even enabled DEBUG, hoping to see some useful message. But no interesting messages there.
 
I am using 2 components for this purpose. Files in the FTP Server location are XML.
Can any of you help me in this?
 
1. FTP Poller <ftp:poller>:
 
xbean.xml :
...
<ftp:poller service="mediations:file"
             endpoint="MyFTPPollerEndpoint"
             targetService="mediations:fileListenerService"
             uri=ftp://me:me@myftpserver/test" />
 
2. Listener Bean <bean:endpoint> and <bean>:
 
xbean.xml:
...
  <bean:endpoint service="mediations:fileListenerService" endpoint="MyListenerEndpoint" bean="#listener"/>
 
  <bean id="listener" class="com.test.MyFileListener"/>
 
MyFileListener.java
 
....
public class MyFileListener implements MessageExchangeListener {
 
    @Resource
    private DeliveryChannel channel;
 
    public void onMessageExchange(MessageExchange exchange) throws MessagingException
    {
      System.out.println("############################## Received exchange: " + exchange);
      exchange.setStatus(ExchangeStatus.DONE);
      channel.send(exchange);
    }
}
 
Thanks for your help in advance
Ramu