DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. A Template Application for Running Axis2 in OSGi Environments

A Template Application for Running Axis2 in OSGi Environments

Valery Abu-Eid user avatar by
Valery Abu-Eid
·
Sep. 10, 08 · Interview
Like (0)
Save
Tweet
Share
13.18K Views

Join the DZone community and get the full member experience.

Join For Free

There is ongoing work in the Axis2 project to make Axis2 engine not only compatible with OSGi but also take all the advantages that OSGi infrastructure provides, so developers could deploy Axis2 Web Services and Modules in bundles. This article aims to provide a template application which allows launching Axis2 in an OSGi Environment within seconds. The application is runnable with Felix and Equinox in Java Environments JDK and JRE versions 1.5 and 1.6.

Archive axis2-osgi-example.zip contains the Template Application with one Web Service "Version Web Service" whose WSDL is accessible from "http://localhost:8080/services/Version?wsdl" and an Axis2 Module with two handlers which are bound to the Web Service. The application also contains a Web Admin interface which is accessible from "http://localhost:8080/system/console/list". If you would like to change the port in use (8080) then make sure to check the readme.txt file.

You can run the application by executing either the batch/script file in the "/axis2-osgi/bin" directory or by executing the following command from the "/axis2-osgi" directory:
> java -jar ./lib/da-launcher-1.0.2.jar

Key Implementation Issues

  • DA-Launcher is used to launch the application: DA-Launcher is used to launch the application as such the application can be configured easily to run with Equinox or Felix and Web Service bundles can be installed/uninstalled by simply copying/removing bundle archives in the Application Bundles directory.
  • Bundles: Axis2 and Axiom bundles are placed in the System Bundles directory "/axis2-osgi/bundles/system-bundles" and user bundles (Web Service and Module bundles) in the Application Bundles directory "/axis2-osgi/bundles/application-bundles".
  • Non-bundled libraries: I used about 12 non-bundled libraries (JAR files that has no OSGi headers) and left them for DA-Launcher to generate bundles from them. So when you run the application for the first time DA-Launcher will generate bundles from the non-bundled libraries then cache them, so next time you run the application, DA-Launcher will use the cached bundles instead of regenerating them. Non-bundled libraries are placed in "/axis2-osgi/bundles/non-bundled-libraries" directory.
  • Pax Web Service: To remove the dependency on Equinox Framework, I used Pax Web Service bundle as the Http Service for the application. The Pax Web Service bundle provides the implementation of the HTTP Service defined by OSGi Service Compendium specification and contains Servlet API and Jetty Web Server Engine classes.
  • Snapshot version of Axis2 and Axiom: Axis2 and Axiom snapshots were used since there were no releases for them.
  • Modifications to Axiom sources: The only modification to the source code of Axiom was specifying the version "1.0.0" for the imported package "javax.xml.stream". No modifications were done for the source code of Axis2.

You can deploy your own Web Services and Modules by copying the bundles that contain them to the "/axis2-osgi/bundles/application-bundles" directory.

Unfortunately, this template currently can't be run with Knopflerfish.

From: www.dynamicjava.org

application Apache Axis2 Web Service Template

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Are the Different Types of API Testing?
  • Java REST API Frameworks
  • 5 Software Developer Competencies: How To Recognize a Good Programmer
  • How Chat GPT-3 Changed the Life of Young DevOps Engineers

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: