Hi,

To be honest, I don't understand your use case.

The ftp:sender endpoint takes a incoming message, uses the marshaller to transform the normalized message into a file and send via FTP.

In your case, you don't have any incoming message. So I think that your sender endpoint is called but doesn't do anything as it has nothing to marshal and send on the FTP.

Firing an event using quartz endpoint is not enough, you need to populate the in message. To do it, you can:
- using a quartz customer marshaler like this:
  <quartz:jobDetail>
    <quartz:jobDetail>
      <quartz:jobDataAsMap>
        <quartz:property key="xml"><![CDATA[
          <hello>world</hello>
        ]]></quartz:property>
      </quartz:jobDataAsMap>
    </quartz:jobDetail>
  </quartz:jobDetail>
This will set the <hello>world</hello> in the in message content and the file will content this. - using another target service that populate the in message (with a servicemix-bean endpoint for example).

PS: please, send this kind of messages on the users mailing list.

Regards
JB

manosha wrote:
Hi
I am trying to schedule file transfer for an FTP using ServiceMix Quartz.I
tried the quratz end points in xbean as well as servicemix file.File transer
is working fine but scheduleing is not happening.
the x bean content is below:
The blow xbean is working fine and this transfers any file at once.

<beans xmlns:ftp="http://servicemix.apache.org/ftp/1.0";
xmlns:tut="urn:servicemix:tutorial">
- <!-- add the sender endpoint here --> - <ftp:sender service="test:receiver" endpoint="receiver"
uri="ftp://ftpuser:p...@172.20.10.206/ftpuser/data/sender";>
- <property name="marshaler">
<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" /> </property>
  </ftp:sender>
- <!-- add the poller endpoint here --> - <ftp:poller service="test:pollerservice" endpoint="pollerendpoint"
uri="ftp://ftpuser:p...@172.20.10.206/ftpuser/data/poller"; recursive="false"
targetService="test:receiver" targetEndpoint="receiver">
- <property name="marshaler">
<bean class="org.apache.servicemix.components.util.BinaryFileMarshaler" /> </property>
  </ftp:poller>
  </beans>
I added the below code after the first line
<quartz:endpoint service="test:receiver" endpoint="receiver"
targetService="test:receiver">
  <quartz:trigger>
    <quartz:simple repeatCount="0" repeatInterval="12000" />
  </quartz:trigger>
</quartz:endpoint>

If this is not the way to implement , then pls guide us how we can implement
ftp file transefer using qauartz. I haven't got any lightneing document on
this to help us.

Thanks in advance.

Reply via email to