Sat, 09 Nov 2002
Mind Electric Glue To Apache Axis
I am pleased to report that my migration from Mind Electric Glue to Apache Axis is well under way.
The Apache Axis team has done a fantastic job of putting together an excellent 1.0 release. And I'm especially thrilled that I can deploy easily on jetty without the weight of a full-blown J2EE server. You may wonder why I abandoned glue. Well, after upgrading to their 3.2 release, I discovered that the config.xml and related descriptors that need to be deployed in a standalone glue app simply don't work. My pleas to the electric support group went unanswered and so I'll be porting all of our SOAP code to Axis on monday. I've had enough, I'm saying when. Chalk one up for free software.
Glue was great while it lasted but they went totally awry with 3.2 release, making it a pain in the ass to deploy standalone java apps and without source, it's pretty much a black box when you get a null pointer exception. I value simplicity, particularly when it comes to deployment. Deployment descriptors are overrated, especially when the code can reflect a lot of the details at runtime. If I need to set parameters, I'll do it in the code, thanks. The declarative vs. imperative approach is fine, but let me make the choice. Don't force me to use the damn descriptors when I have better things to be concerned about. These java libraries could gain a lot from merely emulating SOAP::Lite.
I've got Axis 1.0 running under Jetty 4.1.3 now. I am able to deploy the Calculator sample successfully:
public class Calculator {
public int add(int i1, int i2)
{
return i1 + i2;
}
public int subtract(int i1, int i2)
{
return i1 - i2;
}
}
as http://localhost:8080/axis/Calculator.jws
I'm able to invoke it via HTTP GET:
http://localhost:8080/axis/Calculator.jws?method=add&i1=2&i2=3
and get back the correct answer: 5. And finally, I'm able to run the following perl client against it using SOAP::Lite:
use SOAP::Lite;
my $service = SOAP::Lite->service('http://localhost:8080/axis/Calculator.jws?wsdl');
for ($i = 0; $i <= 9; $i++) {
for ($j = 0; $j <= 9; $j++) {
print $service->add($i,$j);
print "\t";
}
print "\n";
}
and get the proper table:
0 1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
2 3 4 5 6 7 8 9 10 11
3 4 5 6 7 8 9 10 11 12
4 5 6 7 8 9 10 11 12 13
5 6 7 8 9 10 11 12 13 14
6 7 8 9 10 11 12 13 14 15
7 8 9 10 11 12 13 14 15 16
8 9 10 11 12 13 14 15 16 17
9 10 11 12 13 14 15 16 17 18
Posted at: 01:16 | permalink