Generate WSDL C/C++ client stub using AXIS-C
Post date: May 11, 2011 9:52:27 AM
(1)Install Java (run-time package is enough, but javac is a bonus, though I don't think I used javac in this setup). Note:install some new version, I used version 1.6.
(2)Download Axis C++ bin from Apache.org, decompress it. Note that there is a lib/axisjava folder and all the necessary Axis Java files used by Axis C++ are in there, so we don't have to download Axis Java anymore (however, if you try to use log4j you HAVE TO download Axis Java bin/src). And make sure in lib/axis there is already a wsdl2ws.jar in place, or you have to install ant and build the jar from source (which I didn't do)
(3)Edit CLASSPATH environment variable, here is my CLASSPATH variable
1. Start -> Run->Cmd and type following command one by one
D:\>set classpath =%CLASSPATH%;D:\axisjava\axis.jar;D:\axisjava\axis-ant-1.2.1.jar;D:\axisjava\commons-discovery.jar;D:\axisjava\commons-logging.jar;D:\axisjava\jaxrpc.jar;D:\axisjava\mailapi.jar;
D:\axisjava\saaj.jar;D:\axisjava\wsdl2ws.jar;D:\axisjava\wsdl4j.jar;
D:\XMLService.wsdl;d:\
Type this command to generate the files
D:\>java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc++ D:\XMLService.wsdl
Code generation completed.
c++:
java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc++ "your wsdl file full path"
c:
java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -lc "your wsdl file full path"