Ok, I've got the next Problem. The poller reads a file which has an dtd
defined:
<!DOCTYPE Lago35Transfer SYSTEM "test.dtd">

and after the FTP Poller has read the file the message is send to bean
endpoint. Its not much what is done in this bean I copied one of the
examples from the bean component page. So when I want consume the message I
get an NullPointerException cause of the missing dtd:
Received exchange: InOnly[
  id: ID:127.0.1.1-11c235a4d30-3:9
  status: Active
  role: provider
  service:
{http://www.brockhaus-gruppe.de/services}ProductTransformerService
  endpoint: endpoint
  in: Unable to display: java.io.FileNotFoundException:
/smx/products/test.dtd (No such file or directory)
]

This "/smx/products/" path seems to come from the ftp component. But I have
no idea where I can put the dtd so that the service can use it. Any
suggestions?

Regards
/Steffen




steff aka sid wrote:
> 
> 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-tp19271570p19273488.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to