Friday, March 25, 2005

Observations from pairing with Eclipse developers

I'm an IntelliJ IDEA user. I really like the Java IDE that they produce and I've become fairly good at using it. I've been pair programming with a couple of excellent developers who use Eclipse. Eclipse is a beautiful looking IDE and it sure has a ton of features. However, as I've been observing these two developers code, I have noticed that the manner in which Eclipse 3.0.x presents quick fixes (intentions to us IntelliJ people) is unnecessarily cumbersome. An emblem icon shows up in the gutter and you have to use the mouse to activate the quick fix list. Arghhh! In IntelliJ, I can active the intention list from the keyboard. Can the quick fix list be activated from keyboard? Just an observation. Writing code in Eclipse is much different than writing code in IntelliJ. I think I actually write code fragments and then complete code statements with intentions and refactorings. It's so damn easy to do this in IntelliJ; it seems clunky in Eclipse.

Monday, March 14, 2005

Enumeration types and Apache Axis WSDL2Java

I ran into a interesting situation today with Apache Axis. If any of your enumeration values in your enumeration definition start with a number (i.e. 3DES), Apache Axis WSDL2Java generation tool will generate static enumeration instances with nonsense names (i.e. VALUE1, VALUE2, ... VALUEn). Not at all what I was expecting. Seems your values have to abide by Java naming standards for variables if you want Apache Axis to use the value strings as the variable names for the enumeration instances. If any of the values is not compliant, Axis dumps down into the aforementioned VALUEn naming scheme for all values. It would be helpful if Axis dumped a block comment into the generated enumeration Java type stating why the names are nonsense.

Saturday, March 12, 2005

Apache Axis WSDL2Java generator problem

I've been working on some Java web services using the Apache Axis toolkit. The WSDL2Java generator creates a static initializer in the server-side skeleton class that seems to be valid, compilable code. In our situation, we have two methods initially defined in our web service API, and invariably the second method would not be callable from a client test case. It didn't matter if you swapped the method order, the second method metadata (operation descriptions) would be goofed up and the method invocation would puke.

After spending several hours looking at code in the IDE and the debugger, I finally just refactored the static initializer to call two static methods, each setting up an exposed web service method in Axis. This simple method extraction refactoring fixed the problem, but I don't know what was causing the problem in the first place. Very odd stuff.

Friday, March 11, 2005

Securing web services with SSL

I'm currently working on a project where we need to invoke web services hosted in Java (Apache Axis 1.2RC2 in Tomcat 5.0.x) from a Pocket PC 2002 platform. We're using .NET Compact Framework 1.0 SP3 on the handheld. Things have gone surprisingly well and today I added SSL/TLS into the equation. From the Java/Tomcat side, this is very well documented and simple to setup. From the .NET Compact Framework side, things are a bit more unclear. However, this link provided me with a solution. I now have HTTPS working between the .NET CF client application and the Java/Tomcat/Apache Axis web service endpoint. Cool!