Chris,

You can configure the file name on the FTP endpoint the same way as you can with the servicemix-file component. If you look at the first marshaler example on http://servicemix.apache.org/servicemix-file.html, you can use the same thing for ftp (just use ftp:marshaler instead of file:marshaler).

The example uses a message property to determine the name, but you can also use an XPath expresssion to look inside your XML message and grab some information there to make up the file name.

For the conversion to mail, are you using the servicemix-mail component or the camel-mail one? For the servicemix-mail component, you can write your own Marshaler class that allows you to 'translate' the JBI message into a mail message.

Regards,

Gert

chriskee wrote:
I am currently learning how to use servicemix and not sure how I would
achieve the following.

I have a message placed on a JMS Queue and want to post a message to a
defined email address than a message has been recieved.  I also then want to
ftp this message as a simple file.  I am able to pull this message off the
JMS queue and do things with it as long as all it is a XML message.  The
problem I have is when I want to convert to something else such as a email
or a file to FTP.

I had intended to write a JMS consumer and then pass to an EIP component
which then delivered it to both the ftp and email components.  When I try
sending the message as ftp I get a
java.io.IOException: No output stream available for output name: null. Maybe
the file already exists?

I assume this is because I never had a filename from the begining as I am
working with a XML message rather than a file that's been read in.  For
example if I switch to a File poller and can then FTP fine.  My question is
what approach should I use to take a XML message from a queue convert it to
a file to ftp and then also how to convert to send via email.

Any help, no matter how small is gratefully recieved
Thanks
Chris

Reply via email to