Virus scanning with ClamAV and OpenESB
Most of the time, our software customers are pretty confident that the data their receiving from partners is safe. Or maybe just don't think it's a big enough risk - and almost always, they're right. But the other day a question came to me from a pre-sales guy: can we use virus scanners on received data?* Hmmm. I'd not really thought about it before.
Curiosity piqued, I had a quick look at the plethora of anti-virus products available (well, Google did most of the work) but couldn't find one with a Java API. I'm sure such a thing exists, but no big deal. I'll do it myself.
ClamAV is a free, cross-platform virus scanner and a TCP/IP interface which is marvelously simple to take advantage of. Since my daily job involves using OpenESB and related technologies I chose to use this to knock together a quick web service to wrap it. After I'd proven that worked, I also wrote a small composite application which accepts HTTP POSTs, calls the virus scanner and let's you know if it's good or bad. If it's good, it'll also write it out to a file.
OK, so it's pretty trivial but it's a nice demonstration of how easy this was to do with OpenESB.
Project downloads and instructions are available for your perusal at the Java CAPS Grok wiki
*Yes, no problem