Categories
Java Web Development

Axis and Java 1.5 Problem

Axis generates Java code using its WSDL2Java tool, but it is not Java 1.5 compatible.

Share

If you use Java 1.5 and try to use Axis 1.1’s WSDL2Java utility to read a WSDL file and generate Java stubs, you will notice that when the utility generates Enumeration objects which it names enum. Enum is a keyword in Java 1.5 (whoopie!) – so your code will not compile. This sucks.

Update: April 19, 2005
To make the compilation work, use the -source 1.4 switch. In the Ant javac task, add the source attribute and set it to 1.4.

Share
Share