Re: Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Mattias Severson
Thank you very much for your comments, highly appreciated. Of course, you are welcome to link to my post. I have corrected the blog post with the error that you found. Regards, Mattias Severson -- View this message in context: http://camel.465427.n5.nabble.com/Blog-Dynamic-FTP-Client-using

Blog: Dynamic FTP Client using Apache Camel and Spring

2010-08-12 Thread Mattias Severson
://blog.jayway.com/2010/08/12/dynamic-ftp-client-using-apache-camel-and-spring/ Enjoy! Mattias Severson -- View this message in context: http://camel.465427.n5.nabble.com/Blog-Dynamic-FTP-Client-using-Apache-Camel-and-Spring-tp2473481p2473481.html Sent from the Camel - Users mailing list archive at

Re: Configuration of connection timeout when transmitting files to remote SFTP server?

2010-07-07 Thread Mattias Severson
Hmm, maybe I was to hastily to reply and file the issue yesterday. It turned out that there is also a connection timeout on the JCH http://grepcode.com/file/repo1.maven.org/maven2/com.jcraft/jsch/0.1.42/com/jcraft/jsch/Channel.java#Channel.connect%28int%29 Channel class, which is super class to

Re: Configuration of connection timeout when transmitting files to remote SFTP server?

2010-07-06 Thread Mattias Severson
The Session.connect(int timeout) method eventually calls Socket.setSoTimeout(int timeout), which implies that the time unit of the timeout is milliseconds. I have created an issue: https://issues.apache.org/activemq/browse/CAMEL-2912 https://issues.apache.org/activemq/browse/CAMEL-2912 /Mattia

Re: Configuration of connection timeout when transmitting files to remote SFTP server?

2010-07-06 Thread Mattias Severson
I may have found a suitable method, how about the http://grepcode.com/file/repo1.maven.org/maven2/com.jcraft/jsch/0.1.42/com/jcraft/jsch/Session.java#Session.connect%28int%29 Session.connect(int connectTimeout) method? I also found the http://grepcode.com/file/repo1.maven.org/maven2/com.jcraf

Configuration of connection timeout when transmitting files to remote SFTP server?

2010-07-05 Thread Mattias Severson
Hi, How do I set the connection timeout when connecting to a remote FTP server? I attempt to use the ftpClient.connectionTimeout of the http://commons.apache.org/net/api/org/apache/commons/net/ftp/FTPClient.html FTPClient class. It seem to work if the server uses FTP and FTPS, e.g. ftp://u...@

Re: Email character encoding?

2010-06-28 Thread Mattias Severson
I am indeed using Mac OS X for development, i.e. that is where Camel is used. However, the smtp server is running on a Linux machine. I updated the header to headers.put(Exchange.CONTENT_TYPE, "text/plain; charset=ISO-8859-1");, updated to Camel 2.4.SNAPSHOT and I can confirm that your patch so

Re: Email character encoding?

2010-06-28 Thread Mattias Severson
I created a new route which I added to my camel context: from("direct:send").setProperty(Exchange.CHARSET_NAME, new ConstantExpression("ISO-8859-1")).to("smtp://myserver"); And then I updated the producer template: producerTemplate.sendBodyAndHeaders("direct:send", body, camelEmailHeader); The a

Re: Email character encoding?

2010-06-25 Thread Mattias Severson
Thanks for the tip. I am currently on a "long-weekend" vacation, but I will try when I return to work. Do I have create a Process in order to set the Exhange.CHARSET_NAME on the exchange is i possible to take a shortcut and add it to the camel email headers directly, e.g. Map camelEmailHeaders

Re: Email character encoding?

2010-06-24 Thread Mattias Severson
And there is more: The http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/mail/javamail/MimeMessageHelper.html MimeMessageHelper gives more options to send both plain text and html formatted mail in the same message (to support all kinds of email clients), as well

Re: Email character encoding?

2010-06-24 Thread Mattias Severson
Spring has a interface called http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/mail/javamail/JavaMailSender.html JavaMailSender . With it one can create a http://java.sun.com/products/javamail/javadocs/javax/mail/internet/MimeMessage.html MimeMessage that allows

Re: Email character encoding?

2010-06-24 Thread Mattias Severson
Yes, I also read about the US-ASCII encoding. Consequently, I tried to use http://java.sun.com/products/javamail/javadocs/javax/mail/internet/MimeUtility.html#encodeText%28java.lang.String,%20java.lang.String,%20java.lang.String%29 MimeUtility.encodeText(...) with "B" encoding to base 64 encode

Email character encoding?

2010-06-22 Thread Mattias Severson
Hi, I am having trouble sending ISO-8859-1 characters, e.g. åäö, in emails. I have tried to set the defaultEncoding option of the http://camel.apache.org/mail.html Camel Mail component to ISO-8859-1, but that did not solve the problem. The sender is implemented as producerTemplate.sendBodyAn

Re: Dynamic origin file components?

2010-05-31 Thread Mattias Severson
I found the error. It seems like the FTP server that I am is configured to passive mode. Consequently, the solution is as follows: ftp://u...@host:21/remote_directory?password=secret&passiveMode=true /Mattias -- View this message in context: http://old.nabble.com/Dynamic-origin-file-components

Re: Dynamic origin file components?

2010-05-31 Thread Mattias Severson
Hmm, there seem to be a problem when I attempt to verify the suggested solution: I have a local file on my computer /Users/mattias/local_directory/ftp-test.txt The URI I use is of type ftp://u...@host:21/remote_directory?password=secret The Exchange.FILE_NAME in the header is set to ftp-test.txt

Re: Dynamic origin file components?

2010-05-28 Thread Mattias Severson
That seems like a neat solution. :-) Question: Is it possible to send several files to one receiver in a similar way (e.g. by providing a Collection as body)? Naturally, I can iterate over the file collection and send the files one by one, but I guess that the performance would be better if all f

Dynamic origin file components?

2010-05-28 Thread Mattias Severson
Is it possible to create file components dynamically? I have an interface that gives me File objects (after a physical file has been created on disk) that I would like to send to a remote FTP address. The files are created one at the time, in different folders and with different file names. The f

Java DSL routing according to hierarchical pojo configuration object?

2010-05-02 Thread Mattias Severson
Hi, I have a configuration object, that contains many nested pojos, e.g: public class Configuration { private OutputConfiguration outputConfiguration; // More members... public OutputConfiguration getOutputConfiguration() { return outputConfiguration; } // Getters a

Re: Camel newbie, endpoint configuration?

2010-04-30 Thread Mattias Severson
ow testing with mock works so you will > understand it much better. > > > > On Thu, Apr 29, 2010 at 7:06 PM, Mattias Severson > wrote: >> >> Hmm, no there is still something missing >> >> I updated the setUp() method to >> >> �...@before

Re: Camel newbie, endpoint configuration?

2010-04-29 Thread Mattias Severson
xt.getComponent("mock")); > > > > On Thu, Apr 29, 2010 at 5:54 PM, Mattias Severson > wrote: >> >> Hi, >> >> I have a system that has a handle(long id) interface that I must >> implement. >> My plan is to use this method as a Pr

Camel newbie, endpoint configuration?

2010-04-29 Thread Mattias Severson
Hi, I have a system that has a handle(long id) interface that I must implement. My plan is to use this method as a Producer in the camel context: public class SystemApiImpl { public static final String RECIEVER_URL = "some:receiver"; private final ProducerTemplate producerTemplate;

Re: Broken API link?

2010-04-29 Thread Mattias Severson
Thanks, that was quick! :-) /Mattias -- View this message in context: http://old.nabble.com/Broken-API-link--tp28400136p28400357.html Sent from the Camel - Users mailing list archive at Nabble.com.

Broken API link?

2010-04-29 Thread Mattias Severson
Hi, The link to the Camel API on the main page seems to be broken? 1. Goto http://camel.apache.org/ 2. Select "API" 3. Broken link? http://camel.apache.org/maven/camel-core/apidocs/index.html Any ideas? Thanks in advance, Mattias -- View this message in context: http://old.nabble.com/Broken-