4. Install Axis2
• Download the Apache Axis2 Web Service Engine
(axis2.war) from here
http://axis.apache.org/axis2/c/core/download.cgi
• Extract the ZIP file and copy the ‘axis2.war’ file into
the sharable directory (webapps) of Tomcat
• Start the Tomcat Server. Now you can see that there
will be a new directory called ‘axis2’ has been
created automatically under the ‘webapps’ directory
5. Service Class
• You can create the Service Class (Arithmetic.java),
similar to a normal java class
6. Service Description
• In order to deploy our service in Axis2 Engine, we
have to describe it (services.xml)
• Service Description file was a simple XML file
• It provides the META information about the service
for Axis2 Engine
• Axis2 Engine will automatically generate the WSDL
file for the service using the Service Description file
8. • Create a directory structure for the service as
follows
• Now start the Tomcat. Now the service have
been deployed
Service Deployment
9. Service Deployment (Optional)
[ Axis Archive(.aar) file creation ]
• You can create an Axis Archive(.aar) file for your
service with the JAR utility
• Create a directory structure for your service as
follows
10. Service Deployment (Optional)
[ Axis Archive(.aar) file creation ]
• Open Command Prompt(cmd.exe) then go to the
ArithService directory and type the command
jar cvf ArithService.aar .
11. WSDL Generation
• Open your browser the type the following URL to
generate the WSDL for your service
• Go to
http://localhost:8080/axis2 Services ArithService
http://localhost:8080/axis2/services/ArithService?wsdl
(or)
14. • The most convenient way to use PHP is Web Servers
like WAMP, XAMPP, etc.
• In our example we’ve used WAMP Web Server
• Download and install the WAMP Server from here
http://www.wampserver.com
• Start the WAMP Manager
Install PHP
15. Install PHP
• Click the WAMP Manager in System Tray then go to
PHP PHP extensions
then enable ‘php_soap’ extension
• Go to ‘www’ directory by clicking ‘www directory’ in
WAMP Manager menu (or) open <wamp installation
directory>www
• Create a directory called ‘arith_client’
16. PHP Web Service Client
• Create the Web Service Client (index.php) in PHP to
consume the Web Service
17. PHP Web Service Client
• The array indexes ‘args0’ and ‘args1’, the member
variable ‘return’ of the ‘$result’ object and the
parameter ‘add’ (i.e., service name) in the SOAP Call
should match with the WSDL file attributes for each
service call
18. PHP Client Deployment
• Copy the ‘index.php’ file to the ‘arith_client’
directory which was created by us earlier
• Open the browser and go to
• Open the ‘localhost’ in your browser and click
‘arith_client’ under ‘Your Projects’
http://localhost/arith_client
(or)