yangf <[EMAIL PROTECTED]> writes:

> 
> 
> I am using servicemix ftppoller to poll a file from a ftp server and download
> it and write to local directory. here is my servicemix xml file
> =====
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://xbean.org/schemas/spring/1.0";
>       xmlns:spring="http://xbean.org/schemas/spring/1.0";
>       xmlns:sm="http://servicemix.apache.org/config/1.0";
>       xmlns:foo="http://servicemix.org/demo/";>
> 
>       <!-- the JBI container -->
>       <sm:container id="jbi" useMBeanServer="true"
>               createMBeanServer="true" dumpStats="true" statsInterval="10">
> 
>               <sm:activationSpecs>
> 
>                       <!-- Write files to the outbox directory -->
>                       <sm:activationSpec componentName="fileSender"
>                               service="foo:fileSender">
>                               <sm:component>
>                                       <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
>                                       
        class="org.apache.servicemix.components.file.FileWriter">
>                                               <property name="directory" 
value="outbox" />
>                                               <property name="marshaler">
>                                                       <bean
>                                                       
        class="org.apache.servicemix.components.util.DefaultFileMarshaler">
>                                                               
>                                                                       
>                                                       </bean>
>                                               </property>
>                                       </bean>
>                               </sm:component>
>                       </sm:activationSpec>
> 
>                       <!-- Look for files in the inbox directory -->
>                       <sm:activationSpec componentName="ftpPoller"
>                               destinationService="foo:fileSender" 
service="foo:ftpPoller">
>                               <sm:component>
>                                       <bean 
xmlns="http://xbean.org/schemas/spring/1.0";
>                                       
        class="org.apache.servicemix.components.net.FTPPoller">
>                                               <property name="clientPool">
>                                                       <bean 
id="ftpClientPool"
> class="org.apache.servicemix.components.net.FTPClientPool">
>                                                               <property 
name="host" value="138.125.32.99"/>
>                                                               <property 
name="username" value="wlpusr"/>
>                                                               <property 
name="password" value="$Wlpdib1"/>
>                                                       </bean> 
>                                               </property>
> 
>                                               <property name="marshaler">
>                                                       <bean
>                                                       
        class="org.apache.servicemix.components.util.DefaultFileMarshaler">
>                                                               
>                                                                       
>                                                       </bean>
>                                               </property>
> 
>                                               <property name="workManager" 
ref="workManager"/>
>                                               <property name="path" 
value="tmp" />
>                                               <property name="period" 
value="100" />
>                                       </bean>
>                               </sm:component>
>                       </sm:activationSpec>
>               </sm:activationSpecs>
>       </sm:container>
> 
>       <!-- the work manager (thread pool) for this container -->
>       <bean id="workManager"
>               class="org.jencks.factory.WorkManagerFactoryBean">
>               <property name="threadPoolSize" value="30" />
>       </bean>
> 
> </beans>
> 
> === end of xml
> 
> I did not get any error and the poller did not seem doing anything. no file
> has been downloaded and transfered. can anyone help out here??? thanks
> 
> --Fran
> 


I have the same problem is it due to FTP server configuration :

Nothing happens also when I use VFS

Does anybody faced this problem before?

Thanks.

Here is th code

<?xml version="1.0" encoding="UTF-8" ?>
<beans xmlns="http://xbean.org/schemas/spring/1.0"; 
xmlns:spring="http://xbean.org/schemas/spring/1.0";
       xmlns:sm="http://servicemix.apache.org/config/1.0"; 
xmlns:eip="http://servicemix.apache.org/eip/1.0";
       xmlns:foo="http://servicemix.org/demo/";>
  <!-- the JBI container -->
  <sm:container spring:id="jbi" useMBeanServer="true" createMBeanServer="true" 
dumpStats="true" statsInterval="10">
    <sm:activationSpecs>
      <!-- Write files to the outbox directory -->
      <sm:activationSpec componentName="fileSender" service="foo:fileSender">
        <sm:component>
          <bean xmlns="http://xbean.org/schemas/spring/1.0"; 
class="org.apache.servicemix.components.vfs.FileWriter">
            <property name="path" 
value="file://C:/Root/Library/Projects/Projects/SMSListner/EIPTest/working/outb
ox"/>
            <property name="marshaler">
              <bean id="marshaler" 
class="org.apache.servicemix.components.util.BinaryFileMarshaler" 
singleton="true"/>
              <!--
              <bean 
class="org.apache.servicemix.components.util.DefaultFileMarshaler">
                <property name="fileName">
                  <bean 
class="org.apache.servicemix.expression.JaxenStringXPathExpression">
                    <constructor-arg value="concat
('sample_', /sample/@id, '.xml')"/>
                  </bean>
                </property>
              </bean>
              -->
            </property>
          </bean>
        </sm:component>
      </sm:activationSpec>
      <!-- echoComponent -->
      <sm:activationSpec componentName="echoComponent" 
service="foo:echoComponent">
        <sm:component>
          <bean class="org.apache.servicemix.components.util.TraceComponent"/>
        </sm:component>
      </sm:activationSpec>
      <!-- Look for files in the inbox directory -->
      <sm:activationSpec componentName="filePoller" service="foo:filePoller" 
destinationService="foo:echoComponent">
        <sm:component>
          <!-- -->
          <bean xmlns="http://xbean.org/schemas/spring/1.0"; 
class="org.apache.servicemix.components.vfs.FilePoller">
            <!--property name="marshaler">
              <bean id="marshaler" 
class="org.apache.servicemix.components.util.BinaryFileMarshaler" 
singleton="true"/>
            </property-->
            <property name="workManager" ref="workManager"/>
            <property name="path" 
value="ftp://Mokrane:[EMAIL PROTECTED]/" />
            <property name="deleteFile" value="true"/>
            <property name="period" value="3000"/>
          </bean>
        </sm:component>
      </sm:activationSpec>
      <!-- FTP Poller -->
      <sm:activationSpec componentName="ftpPoller" service="foo:ftpPoller" 
destinationService="foo:echoComponent">
        <sm:component>
          <bean class="org.apache.servicemix.components.net.FTPPoller">
            <property name="clientPool" ref="ftpClientPool"/>
            <property name="workManager" ref="workManager"/>
            <!--property name="path" value="mo"/-->
            <property name="period" value="3000"/>
          </bean>
        </sm:component>
      </sm:activationSpec>
    </sm:activationSpecs>
  </sm:container>
  <!-- the work manager (thread pool) for this container -->
  <bean id="workManager" class="org.jencks.factory.WorkManagerFactoryBean">
    <property name="threadPoolSize" value="30"/>
  </bean>
  <bean id="ftpClientPool" 
class="org.apache.servicemix.components.net.FTPClientPool">
    <property name="host" value="169.254.234.2"/>
    <property name="username" value="Mokrane"/>
    <property name="password" value="Mokrane"/>
  </bean>
</beans>



Reply via email to