An example POJO Web service: how to expose the methods of a Java class as a Web service using Aixs2. : POJO Web service « Web Services SOA « Java

Java
1. 2D Graphics GUI
2. 3D
3. Advanced Graphics
4. Ant
5. Apache Common
6. Chart
7. Collections Data Structure
8. Database SQL JDBC
9. Design Pattern
10. Development Class
11. Email
12. Event
13. File Input Output
14. Game
15. Hibernate
16. J2EE
17. J2ME
18. JDK 6
19. JSP
20. JSTL
21. Language Basics
22. Network Protocol
23. PDF RTF
24. Regular Expressions
25. Security
26. Servlets
27. Spring
28. Swing Components
29. Swing JFC
30. SWT JFace Eclipse
31. Threads
32. Tiny Application
33. Velocity
34. Web Services SOA
35. XML
Microsoft Office Word 2007 Tutorial
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java » Web Services SOA » POJO Web serviceScreenshots 
An example POJO Web service: how to expose the methods of a Java class as a Web service using Aixs2.
 
Sample: POJO (Plain Old Java Object)
====================================

Introduction
============

This is an example POJO Web service. It shows how to expose the methods of a Java class as a Web
service using Aixs2.


Prerequisites  
=============

To build the sample service you must have ant-1.6.x installed in your system. 

To set AXIS2_HOME in Unix/Linux type:
$export AXIS2_HOME=<path to axis2 distribution>

Building the Service
====================

To build the sample service, type: $ant generate.service or just ant

This will build the AddressBookService.aar in the build directory and copy it to the
<AXIS2_HOME>/repository/services directory.

You can start the Axis2 server by running either axis2server.bat (on Windowsor axis2server.sh
(on Linux)that are located in <AXIS2_HOME>/bin directory.

The WSDL for this service should be viewable at:

http://<yourhost>:<yourport>/axis2/services/AddressBookService?wsdl 
(e.g. http://localhost:8080/axis2/services/AddressBookService?wsdl)

src/sample/addressbook/rpcclient/AddressBookRPCClient.java is a Client that uses RPCServiceClient
to invoke the methods of this web services just like the method invocations of a Java object.


Running the Client
==================

To compile and run, type
$ant rpc.client

src/sample/addressbook/adbclient/AddressBookADBClient is Client that uses a generated stub with ADB
to invoke the methods of this web service.

To generate the stub, compile and run, type
$ant adb.client -Dwsdl=http://<yourhost>:<yourport>/axis2/services/AddressBookService?wsdl

Help
====
Please contact axis-user list (axis-user@ws.apache.orgif you have any trouble running the sample.
        
AXIS2-pojo.zip( 8 k)
Related examples in the same category
1. This sample shows how to expose a Java class as a web service
2. In this sample, we are deploying a POJO after writing a services.xml and creating an aar
3. How to expose the getters and setters of a Service: this demo uses the Spring to initialize the property of the Service
w__w_w___._j___ava_2_s__.__c__om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.