Saturday, March 28, 2009

Where did the WSDL2C Tool go in Axis2/Java 1.4.1?

Let me prefix this blog with a note that this posting is geared towards other developers working with Axis/C. It is pure technical in nature.

It is my goal to someday have Photo Parata be cross platform, both Windows and OSX. Too keep things as OS neutral as possible, I am going to be using the OS neutral Axis2/C Web services engine rather than the proprietary Microsoft Windows Communication Framework (WCF).

Section 17 of the Axis2/C manual discusses the WSDL2C Tool to generate all the stub code. The tool is in the Axis2/Java version. When I went looking for the bat file, I only found the Java counter part, WSDL2Java.bat. I looked in the Axis2/Java source and saw that the WSDK2C class is still present.

The solution was simple at this point: copy the WSDL2Java.bat to WSDL2C.bat and on the third to last line that looked like this:

%_RUNJAVA% %JAVA_OPTS% -cp "!AXIS2_CLASS_PATH!" org.apache.axis2.wsdl.WSDL2Java %*

Change the WSDL2Java to WSDL2C

Set your JAVA_HOME and AXIS2_HOME environment variables and everything is set!

Sam

No comments: