Tuesday, November 23, 2004

Spring and Axis

Started looking into Spring. Inversion of Control (IoC) and Dependency Injection are pretty cool things. (See Martin Fowler's article for more info on that.) Spring uses IoC/DI to remove dependencies from your objects, turning them into POJO's, which in turn makes them much easier to test. And Spring makes using web services (via JAX-RPC, anyway) a much easier task.

So I'm now setting up Axis. You plop it into Tomcat, then run a test page to see if all's well. It wasn't. It complained: "Error: could not find class javax.activation.DataHandler from file activation.jar". I have a few different versions of activation.jar on my box; I copied the one that came with Spring into axis/WEB-INF/lib, but Tomcat didn't see it without a restart. (There's probably a better way to get it to see it; I'll look into that shortly...)

With activation.jar in place, Axis' test page is all happy, so I tried out a couple of the samples, and got NullPointerExceptions. Poked around on Google a bit, and it seems that Axis 1.1 doesn't play nice with JDK 1.5. Grabbed Axis 1.2RC2, installed it, replaced it in Tomcat, added activation.jar, got the happy page working, tried the samples, and viola (as they say in France), I get proper responses.

0 Comments:

Post a Comment

<< Home