SOA Implementation Using Java Skeleton And .Net Stub.

Conversion of POJO’s into Web-Services

SOA: SOA is the abbreviation for Service Oriented Architecture. It is one of the programming styles by which one can create/use and expose the services over a network.

Why do we need SOA?

The world is expanding with knowledge, in the form of data; there is an immense need for few of the legacy applications to be in phase with the new worlds data. Programmers face difficulty in maintaining and updating these legacy applications due to various reasons like internal dependencies, language obscurity, etc… In such a case, SOA seems to be an auxiliary tool which can void the programmer’s night-mare.

Using SOA programmer’s can program in such a way that the legacy system can be in phase with the new technology. SOA does this miracle by sandwiching the new technology and the legacy application with a thin layer which can interact between the two entities.

Not only in case of the legacy applications, SOA show’s it’s commanding position even in case of new technologies/ applications. Whenever two or more application needs to exchange the data, SOA provides a bridge between the applications, which overlays one of the programming challenge language dependency.

What do we achieve by implementing SOA?

By using SOA programmers can easily configure two or more application to interact and to exchange the data.

Which are the different approaches to implement SOA?

There are two approaches to implement SOA:

  1. Top Down approach: in this approach the programmers integrate the SOA structure for the existing application by creating a wrapper layer which interacts between the applications. This approach is usually used only when SOA needs’ to be integrated to the existing systems.

  1. Bottom up approach: in this case the programmers code the application, by keeping a view in the mind that the services being coded will be exposed as a service over the network. This approach is usually followed while developing a new application.

Concerns to be accounted while implement SOA:

  1. While implementing SOA, there is a requirement for the service provider and the service consumer to agree upon the data format being exchanged across the applications.

  2. Security is the main concern which has to be taken care off. Whenever a service is exposed, the system should be intelligent enough to know the consumer’s consuming the service and to log the transactions. As well as, system should expose the service only for the legitimate consumers, System should be protected from the hackers.

Software requirements:

  1. Apache Tomcat Server / JBoss.

  2. Eclipse IDE.

Configuring Eclipse for Axis2 plug-ins:

1) Download Axis2 plug-ins:

2) Unzip the files into eclipse plug-in folder.


Configuring Apache Tomcat server with Axis2 plug-in:

1) Download the plug-in:

2) Unzip the file into \webapps folder which is present in Apache Tomcat installed directory.


3) To confirm whether the Apache Tomcat Server is configured with Axis2, hit the URL: http://localhost:8080/axis2/ .

The below shown page should appear.


  1. Conversion of POJO’s into Web-Services:


  1. Once Eclipse and Server are configured, the next step will be to identify the services which you will be exposing as Web-Services.

  2. Decide whether a wrapper class is required to expose the service, if required code the wrapper class then, proceed to step 3 to create Axis Archived file (.aar file).

  3. Compile the class to generate the .class files.

  4. Right click on the “Package Explorer” window on Eclipse. Then follow the path
    New >
    Other > Axis2 Wizard.

    45Then click on next.

  5. Select the directory where the .class files for the services are present.


  6. Check the “Skip WSDL” check-box.


  7. Add the entire jar’s which will be required to generate the .aar files.


  8. If the archive file requires any service XML files it can include. Else select the “Generate the service xml automatically” checkbox.


  9. Load the class file and select the methods which you will be exposing as a web-service.


  10. Select the output location where the .aar file, is to be generated.


  11. When you click finish, wait for the confirmation message.


    The .aar file will be successfully generated.

II. Deploying .aar file into Tomcat server using Axis2 service provider:

  1. Login into the axis2 server by accessing the URL: http://localhost:8080/axis2/axis2-admin/


  2. Click on “upload service”


  3. Select the .aar file and click on “upload” button.


  4. Wait for the conformation message!


  5. To confirm the service is uploaded hit the url: http://localhost:8080/axis2/services/listServices


This confirms that the service is deployed successfully.

Finally, make sure that the library files which will be required for the service to work are deployed in lib directory.

C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\lib


Testing of the service using .net Client:


  1. Add the web reference by following the path:
    Add web References.

  2. Add the web reference by selecting the URL on which the web service is hosted:


  3. Write the client code.


  4. Run the code to see the output:

    22@ .net Client – Courtesy – Deepesh P C – NTL Bangalore.

****************** ******************