User Manual

Developing the TemperatureConverter Web Service on Windows
Developing the TemperatureConverter web service on a Windows system involves the following
activities:
1. Generating the web service skeleton file using WSDL2Java
2. Update service skeleton with business logic
3. Creating an Axis2/Java AAR File
Generating the web service skeleton file using WSDL2Java
To generate the web service skeleton file, complete the following steps:
1. Create the TemperatureConverter-Contract-First sub-directory in <My SASH
Home>\axis2\gettingstarted directory on your Windows system.
2. Create a WSDL file for the TemperatureConverter application. You can use one of the following
approaches to create a WSDL file:
1. Use an existing WSDL file.
If you want to use an existing WSDL file, save the file as TemperatureConverter.wsdl
in the <My SASH
Home>\axis2\gettingstarted\TemperatureConverter-Contract-First
directory.
2. Create a new WSDL file.
Open any text editor that you have on your Windows system. Save the file as
TemperatureConverter.wsdl in the <My SASH
Home>\axis2\gettingstarted\TemperatureConverter-Contract-First
directory and include the required contract.
3. Set the bin directory of Axis2/Java in the Path variable using the following command:
<command prompt>: set AXIS2_HOME=<Axis2 Home>
For example,
command>set AXIS2_HOME=C:\axis2-1.5.2-bin
command>set PATH=%PATH%;%AXIS2_HOME%\bin;
4. Run the following command to generate the service skeleton file, an ant build file, and the
service descriptor file:
<command prompt>: WSDL2Java -uri TemperatureConverter.wsdl -ss -sd true
The command generates the following service artifacts:
build.xml
This is an ant file that is used to perform tasks such as, build the Axis2/Java archive file,
clean the Axis2/Java archive file, and so on.
resources
This directory contains two files: the WSDL file for the service,
TemperatureConverter.wsdl, and the service descriptor file, services.xml file
src
This is the source folder for the application. By default, the following package structure
is created in the src directory:
org\apache\axis2\
NOTE: You can also specify a different package structure for your application using
the WSDL2Java tool. For more information on the WSDL2Java options, see http://
ws.apache.org/axis/java/reference.html.
Overview of TemperatureConverter 337