Generate The SOAP Client
In our example we will generate the client using SOAPUI and Apache CXF 2.5.2 Please note that SOAPGUI and Apache CXF are 3rd party tools which are not part of Valuemation. USU bears no responsibility with respect to their use.
- Download SOAPUI by SmartBear (http://www.soapui.org/) and install it.
Note that the JAVA_HOME environment variable must be set in order to generate the source code and compile it.
- Download CXF 2.5: apache-cxf-2.5.2.zip (http://archive.apache.org/dist/cxf/2.5.2/) and unzip it to <CXF-HOME> e.g. C:\development\tools\apache-cxf-2.5.2\
- Start the SOAP UI and set the CXF Home bin (under 'Preferences' / 'Tools').
- Create a new SOAP project
For example
Project Name: GlobalWeather
Initial WSDL: <path and name of the wsdl file>
- From the right-click context menu (on 'GlobalWeatherSoap', in our example), select action 'Generate Code' / 'Apache CXF'.
- Provide necessary settings on the 'Basic' and 'Advanced' tabs.
- Click the 'Generate' button at the bottom of the 'Apache CXF Stubs' window. If everything is set up correctly, the client’s java and class files are generated.
- Go to the class folder and generate a jar files by using a jar tool.
See http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jar.html for more information on the jar command.
|