Ok, I've figured it out and attached my Config files. The Java Class is
placed under  "/src/main/java" in the ftp poller service unit.



> <beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0";
>        xmlns:bean="http://www.springframework.org/schema/beans";
>        xmlns:service="http://www.brockhaus-gruppe.de/services";
>        xmlns="http://www.springframework.org/schema/beans";
>        xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://servicemix.apache.org/ftp/1.0
> http://servicemix.apache.org/schema/servicemix-ftp-3.2.2.xsd
>        http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>
> 
>   <ftp:poller service="service:FtpInputService"
>               endpoint="endpoint"
>               targetService="service:ProductTransformerService"
>               uri="ftp://servicemix:[EMAIL PROTECTED]/smx/products"
>               filter="#XMLFilter" />
>               
>    <bean:bean id="XMLFilter" class="de.brockhaus-gruppe.utils.XMLFilter"/>
> 
> </beans>
> 

And the bean class:


> package de.brockhaus-gruppe.utils;
> 
> import java.io.File;
> import java.io.FileFilter;
> 
> public class XMLFilter implements FileFilter {
>       
>       public static String XML_FILEEXTENSION = ".xml";
>       
>       public boolean accept(File pathname) {
>               String strFilename = pathname.getName();
>               if (strFilename.endsWith(XML_FILEEXTENSION)) {
>                       return true;
>               }
>               return false;
>       }
> }
> 

Greetings
/Steffen

P.s. I'am subscribed to the mailing list (am I???) but I don't receive any
mails!! So anyone has an idea why this happens?


steff aka sid wrote:
> 
> Hi all,
> I'am trying to create a ftp poller with a filter for specific file
> extensions (e.g. *.xml). I found out that I have to use an
> java.io.FileFilter to do that. But I've serveral questions:
> - are there any classes which could be used? (maybe with example how to
> use in smx)
> - if I write my own class where do I have to put it, is it packaged with
> the ftp service-unit?
> 
> Greetings
> /Steffen
> 
> -- 
> 
> *Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE*
> 
> Brockhaus GmbH
> Häuserstr. 36
> D - 69115 Heidelberg
> Email: [EMAIL PROTECTED]
> Web: www.brockhaus-gruppe.de / www.brockhaus-group.com
> 
> Geschäftsführer: Dipl. Kfm. Matthias Bohnen
> Amtsgericht Mannheim, HRB 704665 / USt-IdNr.: DE 227616670
> 
> 
> 
> -----
> Brockhaus GmbH
> COMPETITIVE THROUGH KNOWLEDGE
> 
> Web: www.brockhaus-gruppe.de  / www.brockhaus-group.com 
> 


-----
Brockhaus GmbH
COMPETITIVE THROUGH KNOWLEDGE

Web:  http://www.brockhaus-gruppe.de www.brockhaus-gruppe.de  / 
http://www.brockhaus-group.com www.brockhaus-group.com 
-- 
View this message in context: 
http://www.nabble.com/FTP-%3A%3A-Poller-with-Filter-tp19271570p19272757.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to