I think Apache Axis2 is the most effective, efficient and useful open source java web service framework ever written. Not only that, if you are new to Java web services, Axis2 provides a lot of handy tools and mechanisms in order to start exploring WS technology. One of the easiest way of learning Axis2 is start with POJO (Plain old Java objects). You may wonder that you can deploy a java class as an Axis2 service in one line of code!!!
Lets have a look...
1. Write a java class
2. Add following line inside the main method of your class
new AxisServer().deployService(SimplePojo.class.getName());
Make sure to add Axis2 libraries in your class path. (Axis2-1.3 can be downloaded from here)
3. Open your favorite browser and issue http://localhost:6060
4. You will see that your java class is exposed as an web service.
Here is the complete sample code which can be copied to your IDE and play with it.
package org.test;
import org.apache.axis2.AxisFault;
import org.apache.axis2.engine.AxisServer;
public class SimplePojo {
public int addnumbers(int x, int y){
return x+y;
}
public static void main(String[] args)throws AxisFault {
new AxisServer().deployService(SimplePojo.class.getName());
}
}
Thursday, February 14, 2008
Tuesday, February 12, 2008
Finding critical bugs at the critical moments of a release
The issues of a product can typically be revealed during the functional/regression test cycles. Most of the text books and web resources written about SQA, suggest to follow a properly designed test processes in order to catch bugs as early as possible. I strongly agree with that. However it is not always a practical approach to adhering to that kind of process. In my experience, more bugs are uncovered and caught by test teams when the product is matured and the team is familiar and well aware of the functionality of the product. One may argue that the good test design should anticipate all possible scenarios. However, it is not always true. Most of the practical and useful test scenarios are captured during the test execution stage NOT in the design phase.
I'm not going to say that QA doesn't have to be part of early planning and reviewing to find out issues. it will definitely help to capture design level defects as well as preparing test cases and scenarios. However, even with all efforts, you will encounter the last minute issues when product is mature and fully integrated, also QA have enough knowledge about the product in user's perspective.
Therefore last minute issues are not strange, specially in the modern agile development processes.
In my experience, one of the most important aspect of agile QA is to reveal critical issues as quicker as possible at any stage of the development cycle. In agile methodologies, QA do not get the luxury of following a proper release cycles and sufficient schedule for comprehensive testing. Therefore, QA should be in a position to capture critical bugs in a quicker way whenever a new build is given for testing.
So, what does it mean by finding critical bugs at the critical moments of a release?
Suppose, you are assigned to test a software product which has already undergone number of functional and regression testing cycles. Therefore, the critical issues are minimum in that kind of a product. Assume, a simple performance fix has been done in order to improve concurrency handling of the product and a minor release is expected to be done within a day. In such situation, a traditional QA process may suggest to do a smoke test to ensure the existing functionalities are not affected by that fix. Yes. That is important. However, QA should be able to try out a set of ad-hoc scenarios in order to capture some hidden issues which may have arisen due to the performance fix. QA/test engineers should use their experience to carry out some random checks to ensure that the quality of the product is not affected by the fix. There are situations where QA do not even get enough time to do a full smoke test. In such situations, QA can act wisely with the product knowledge and common sense to find out regression issues as quicker as possible.
In other words, QA should have a better understanding on exploratory testing. I will post a new blog entry on my experience in exploratory testing in due course.
I'm not going to say that QA doesn't have to be part of early planning and reviewing to find out issues. it will definitely help to capture design level defects as well as preparing test cases and scenarios. However, even with all efforts, you will encounter the last minute issues when product is mature and fully integrated, also QA have enough knowledge about the product in user's perspective.
Therefore last minute issues are not strange, specially in the modern agile development processes.
In my experience, one of the most important aspect of agile QA is to reveal critical issues as quicker as possible at any stage of the development cycle. In agile methodologies, QA do not get the luxury of following a proper release cycles and sufficient schedule for comprehensive testing. Therefore, QA should be in a position to capture critical bugs in a quicker way whenever a new build is given for testing.
So, what does it mean by finding critical bugs at the critical moments of a release?
Suppose, you are assigned to test a software product which has already undergone number of functional and regression testing cycles. Therefore, the critical issues are minimum in that kind of a product. Assume, a simple performance fix has been done in order to improve concurrency handling of the product and a minor release is expected to be done within a day. In such situation, a traditional QA process may suggest to do a smoke test to ensure the existing functionalities are not affected by that fix. Yes. That is important. However, QA should be able to try out a set of ad-hoc scenarios in order to capture some hidden issues which may have arisen due to the performance fix. QA/test engineers should use their experience to carry out some random checks to ensure that the quality of the product is not affected by the fix. There are situations where QA do not even get enough time to do a full smoke test. In such situations, QA can act wisely with the product knowledge and common sense to find out regression issues as quicker as possible.
In other words, QA should have a better understanding on exploratory testing. I will post a new blog entry on my experience in exploratory testing in due course.
Wednesday, February 6, 2008
Exposing a spring bean as a web service
One of the major requirements expected from a web service framework is to expose the existing business components as web services. Spring framework has been using for Enterprise Application development for many years as it provides a more simpler approach than traditional J2EE application development.
WSO2 Web services application server provides an easy-to-use and efficient mechanism for exposing your Spring beans as java web service in a jiffy.
Pre-requisites:
WSO2 web services application server - WSAS2.2 (Download)
Step 1
As the first step, we should implement the Spring class (pojo) which needs to be exposed as the web service. I will write a very simple pojo which has one In-Out method as follows.
package org.ws.test;
public class Inoutbean {
public String echo(String s){
return s;
}
}
Compile and save the class.
Step 2
Now, we need to create the associated spring configuration file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="InoutSpringBean" class="org.ws.test.Inoutbean">
</bean>
</beans>
Save the file as spring.xml
Step 3
Bundle the spring class in a jar so that it can be deployed on WSAS. Say the jar file is SpringBeans.jar
Steps 4
Start WSO2 Web services application server (WSAS) and access its management console using https://localhost:9443
Next, select 'Services' from the left navigation menu. You will be directed to the 'Service & Service Group Management' page.
Click on 'Upload Spring service' link.

Step 5
Next, select the SpringBeans.jar and the spring.xml and click on upload. You will be directed to the following screen.

You can select the spring bean from this screen and click on 'Generate' to complete the deployment.
Step 6
Now, the service deployment task is over and you can verify the service invocation with Tryit utility. Or else, just send a REST request as follows and check whether the expected output is returned in your browser
http://localhost:9762/services/InoutSpringBean/echo?s=hi
You may have noticed the ease-of-use when exposing a spring bean through WSO2 WSAS. The same procedure can be applied for any complex spring beans.
Before completing our scenario, you may have a look at the generated service archive by WSAS. It will reside at WSAS_HOME/repository/services. Open the 'SpringBeans.aar' and check the /META-INF/services.xml. You will see the following element there.
<parameter locked="true" name="ServiceObjectSupplier">org.wso2.wsas.admin.service.spring.GenericApplicationContextSupplier</parameter>
This is the most important entity of spring service generation and it instructs WSAS to load the Spring beans from the Spring configuration file.
WSO2 Web services application server provides an easy-to-use and efficient mechanism for exposing your Spring beans as java web service in a jiffy.
Pre-requisites:
WSO2 web services application server - WSAS2.2 (Download)
Step 1
As the first step, we should implement the Spring class (pojo) which needs to be exposed as the web service. I will write a very simple pojo which has one In-Out method as follows.
package org.ws.test;
public class Inoutbean {
public String echo(String s){
return s;
}
}
Compile and save the class.
Step 2
Now, we need to create the associated spring configuration file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="InoutSpringBean" class="org.ws.test.Inoutbean">
</bean>
</beans>
Save the file as spring.xml
Step 3
Bundle the spring class in a jar so that it can be deployed on WSAS. Say the jar file is SpringBeans.jar
Steps 4
Start WSO2 Web services application server (WSAS) and access its management console using https://localhost:9443
Next, select 'Services' from the left navigation menu. You will be directed to the 'Service & Service Group Management' page.
Click on 'Upload Spring service' link.
Step 5
Next, select the SpringBeans.jar and the spring.xml and click on upload. You will be directed to the following screen.
You can select the spring bean from this screen and click on 'Generate' to complete the deployment.
Step 6
Now, the service deployment task is over and you can verify the service invocation with Tryit utility. Or else, just send a REST request as follows and check whether the expected output is returned in your browser
http://localhost:9762/services/InoutSpringBean/echo?s=hi
You may have noticed the ease-of-use when exposing a spring bean through WSO2 WSAS. The same procedure can be applied for any complex spring beans.
Before completing our scenario, you may have a look at the generated service archive by WSAS. It will reside at WSAS_HOME/repository/services. Open the 'SpringBeans.aar' and check the /META-INF/services.xml. You will see the following element there.
<parameter locked="true" name="ServiceObjectSupplier">org.wso2.wsas.admin.service.spring.GenericApplicationContextSupplier</parameter>
This is the most important entity of spring service generation and it instructs WSAS to load the Spring beans from the Spring configuration file.
Thursday, January 31, 2008
Badboy is not bad!!!
I was having a difficult time last couple of days to find out a reliable open source load testing tool. WebLoad, OpenSTA, Badboy a few among a set of load test tools which were used for evaluation. As a result of the evaluation, I noticed that Badboy seems reliable and easy to use in capturing and replaying browser activities. We wanted to do a load test on WSO2 mashup user portal, mooshup.com and Badboy was successful in our scenario.
Badboy can easily be used to capture user navigation of a web site and the scenario can be converted to a set of threads. The test scenario captured by the tool can be exported to JMeter and run the load test through JMeter. So that, the effective reporting capabilities of JMeter can be utilized.
After all, I would recommend Badboy for any basic level load test scenario since it is free and very user friendly.
Badboy can easily be used to capture user navigation of a web site and the scenario can be converted to a set of threads. The test scenario captured by the tool can be exported to JMeter and run the load test through JMeter. So that, the effective reporting capabilities of JMeter can be utilized.
After all, I would recommend Badboy for any basic level load test scenario since it is free and very user friendly.
Wednesday, January 30, 2008
Exploratory Testing: Finding the Music of Software Investigation
Jonathan Kohl discusses about improving exploratory testing skills in this article.
"Through experience and a lot of trial and error, testers and musicians have developed skills they can’t easily explain. Unfortunately, with software testing, there aren’t as many obvious avenues for skill development as there are for musicians. Many software testers don’t realize that there are learnable exploratory testing skills they can develop to help them become even more valuable to software development teams."
"Through experience and a lot of trial and error, testers and musicians have developed skills they can’t easily explain. Unfortunately, with software testing, there aren’t as many obvious avenues for skill development as there are for musicians. Many software testers don’t realize that there are learnable exploratory testing skills they can develop to help them become even more valuable to software development teams."
Dr. Sanjiva on Web Services, REST and Open Source SOA
Dr. Sanjiva Weerawarna explains his strategy on SOA and web services in an interview at QCon San Francisco.
Wednesday, January 23, 2008
WSO2 WSAS 2.2 released
The WSO2 WSAS team is pleased to announce the release of the WSO2 WSAS 2.2. WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 release under the Apache Software License 2.0.
This release can be downloaded from http://wso2.org/projects/wsas/java
Maven2 binary distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/
Maven2 source distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- Classifier : src
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/
From the WSO2 WSAS 2.2 - Release Note - 22nd Jan 2008
=====================================================
WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 and which offers a complete middleware solution. It is a lightweight, high performing platform for Service Oriented Architectures, enabling business logic and applications.
Bringing together a number of Apache Web services projects, WSO2 WSAS provides a secure, transactional and reliable runtime for deploying and managing Web services.
Key Features
------------
* Data services support - Expose you enterprise data as a services in a jiffy
* WSAS IDE - Eclipse IDE integration
* Clustering support for High Availability & High Scalability
* Full support for WS-Security, WS-Trust, WS-Policy and WS-Secure Conversation and XKMS
* EJB service provider support - Expose your EJBs as services
* Axis1 backward compatibility - Deploy Axis1 services on WSAS & Engage advanced WS-* protocols in front of legacy services
* JMX & Web interface based monitoring and management
* WS-* & REST support
* GUI, command line & IDE based tools for Web service development
New Features In This Release
----------------------------
* Improved Data Services support including New & improved UI, and database connection pooling
* WS-Security 1.1 support
* Improved clustering support
* Improved JSR-181 & JAXWS support
* JMX based monitoring
* Graceful shutdown & restart of the server
Serve all pending requests before shutting down or restarting the server
* Improvements to the Management Console
* Various bug fixes to Apache Axis2, Apache Rampart & WSAS
Data Services - Bringing Enterprise Data to Web
-----------------------------------------------
* Service enable data locked in relational databases, CSV & Excel files in no time
* Zero code. Simple descriptor file describes the data to service mapping
* Controlled access to your data
* Customizable XML output
* Benefit from REST & WS-* support
* Built-in Connection pooling support
* Supports exposing Stored procedures & functions
* Built-in caching
* Throttling - to ensure your database is never overloaded.
* Easy configuration via graphical console
* Test your services via Try-it tool
Training
--------
WSO2 Inc. offers a variety of professional Training Programs, including
training on general Web services as well as WSO2 WSAS, Apache Axis2, Data Services
and a number of other products.
For additional support information please refer to
http://wso2.com/training/course-catalog/
Support
-------
WSO2 Inc. offers a variety of development and production support
programs, ranging from Web-based support up through normal business
hours, to premium 24x7 phone support.
For additional support information please refer to http://wso2.com/support/
For more information on WSO2 WSAS, visit the WSO2 Oxygen Tank (http://wso2.org)
How to do various things with WSAS - WSAS HOWTO Series(http://wso2.org/library/2707)
For further information see the full release note http://wso2.org/project/wsas/java/2.2/docs/release_notes.html
This release can be downloaded from http://wso2.org/projects/wsas/java
Maven2 binary distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/
Maven2 source distribution download
- Group Id : org.wso2.wsas
- Artifact Id : wso2wsas
- Version : 2.2
- Type : zip
- Classifier : src
- WSO2 Maven2 Repository URL : http://dist.wso2.org/maven2/
From the WSO2 WSAS 2.2 - Release Note - 22nd Jan 2008
=====================================================
WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 and which offers a complete middleware solution. It is a lightweight, high performing platform for Service Oriented Architectures, enabling business logic and applications.
Bringing together a number of Apache Web services projects, WSO2 WSAS provides a secure, transactional and reliable runtime for deploying and managing Web services.
Key Features
------------
* Data services support - Expose you enterprise data as a services in a jiffy
* WSAS IDE - Eclipse IDE integration
* Clustering support for High Availability & High Scalability
* Full support for WS-Security, WS-Trust, WS-Policy and WS-Secure Conversation and XKMS
* EJB service provider support - Expose your EJBs as services
* Axis1 backward compatibility - Deploy Axis1 services on WSAS & Engage advanced WS-* protocols in front of legacy services
* JMX & Web interface based monitoring and management
* WS-* & REST support
* GUI, command line & IDE based tools for Web service development
New Features In This Release
----------------------------
* Improved Data Services support including New & improved UI, and database connection pooling
* WS-Security 1.1 support
* Improved clustering support
* Improved JSR-181 & JAXWS support
* JMX based monitoring
* Graceful shutdown & restart of the server
Serve all pending requests before shutting down or restarting the server
* Improvements to the Management Console
* Various bug fixes to Apache Axis2, Apache Rampart & WSAS
Data Services - Bringing Enterprise Data to Web
-----------------------------------------------
* Service enable data locked in relational databases, CSV & Excel files in no time
* Zero code. Simple descriptor file describes the data to service mapping
* Controlled access to your data
* Customizable XML output
* Benefit from REST & WS-* support
* Built-in Connection pooling support
* Supports exposing Stored procedures & functions
* Built-in caching
* Throttling - to ensure your database is never overloaded.
* Easy configuration via graphical console
* Test your services via Try-it tool
Training
--------
WSO2 Inc. offers a variety of professional Training Programs, including
training on general Web services as well as WSO2 WSAS, Apache Axis2, Data Services
and a number of other products.
For additional support information please refer to
http://wso2.com/training/course-catalog/
Support
-------
WSO2 Inc. offers a variety of development and production support
programs, ranging from Web-based support up through normal business
hours, to premium 24x7 phone support.
For additional support information please refer to http://wso2.com/support/
For more information on WSO2 WSAS, visit the WSO2 Oxygen Tank (http://wso2.org)
How to do various things with WSAS - WSAS HOWTO Series(http://wso2.org/library/2707)
For further information see the full release note http://wso2.org/project/wsas/java/2.2/docs/release_notes.html
Subscribe to:
Posts (Atom)