Showing posts from 2009

How to install WSO2 Carbon cluster management feature

I have written and published a tutorial on which guides you through the steps of installing WSO2 Carbon cluster management feature.

Selenium test reporting with maven surefire report plugin

If you are familiar with Junit, you may have already known the maven surefire plugin which enables running unit test inside maven build cycles. Normally, surefire plugin generates the XML test reports at /target/surefire-reports directory. If you use selenium RC integrated with your build system or as a separate test framework, you may use maven-selenium-plugin coupled with the surefire plugin to launch your tests. As far as I know, there are two ways to generate test reports when selenium is coupled with maven. 1. Use LoggingSelenium java library to generate HTML test reports with screenshots 2. Use maven-surefire-report plugin This post is about the latter one, maven-surefire-report plugin. The default configuration of surefire-report-plugin is trivial. You just need to add a <reporting> element to projects' pom.xml as follows. <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <

Running WSO2 Carbon based products on IBM JDK

The next minor release of WSO2 Carbon product platform (2.0.2) will be fully compatible with IBM JDK (IBM J9 VM 2.4). You simply need to update transports.xml as follows in order to run any of the WSO2 carbon based product on IBM JDK. Open CARBON_HOME/transports.xml Add the following parameter to HTTPS transport configuration <parameter name="algorithm">IBMX509</parameter> Now, restart carbon. Server will be started successfully on IBM JDK. Carbon-2.0.2 product platform will be released within next week. Stay tuned..

How to configure persistent RM in WSO2 WSAS

WSO2 Web Services Application Server (WSAS) provides with a storage manager in which you can persist messages transmitted between RMS (reliable messaging source) and RMD (reliable messaging destination). By configuring persistent RM, you can prevent messages loses even if the server is down. This post guides you through the steps to configure persistent RM in the latest versions of WSO2 WSAS (WSAS-3.*). I assume you have a basic understanding about WS-RM, if not, please read first. Pre-requisites Download and install WSO2 WSAS-3.1.1 Persistent implementation of WS-RM will be supported in most of the popular DBMSs. However, I will use MySQL server 5.* in this demonstration. Therefore, install and configure MySQL. Step 1 As the first step, we need to create the persistent storage which is going to be used in reliable message transmission. Lets create a data base and the necessary table as follows. mysql>create database SANDESH

How to pass system properties to maven surefire plugin test run

While developing WSO2 QA test framework (which is based on selenium RC), we wanted to give users the choice of selecting test cases without running whole suite at once. Our plan was to pass a system property during maven test run. However, passing a system property directly through command line does not work since the surefire plugin is run under a different JVM instance that is launched by Maven. In order to overcome this, maven surefire plugin can be configured as follows by specifying the required system property. <systemProperties> <property> <name>test.suite</name> <value>${test.suite}</value> </property> </systemProperties> According to this example configuration, we can run test suite with passing a system property as follows. 'mvn clean install -Dtest.suite=test-case'

The newest version (2.0.1) of WSO2 carbon family of prodcuts released!!

The latest version of WSO2 carbon based products were released yesterday. More info can be found at New Features in This Release ---------------------------- * Improved transaction support. * Improved Support for deploying on top of WebSphere, WebLogic, and JBoss. * P2 based provisioning for WSO2 Carbon family of products. * Numerous bug fixes.

How to run multiple WSO2 WSAS instances in a single host

I have published a simple three step tutorial on running multiple WSO2 WSAS instances in a single host in WSO2 Oxygen Tank . Have a look!

How to enable JMS in WSO2 WSAS-3.*

WSO2 WSAS provides with a simple and easily configurable UI to enable transports. In this post, we are going to look at how JMS is enabled in WSAS-3.* versions. Pre-requisites: ---------------- You can use any JMS provider as you preferred. I'm going to use Apache ActiveMQ-5.2.0 for this example. Download the latest version of WSO2 WSAS from here Step 1 ------- Suppose you have downloaded WSO2 WSAS-3.* and extracted in to a directory in your file system. Let it be WSAS_HOME First, we need to start ActiveMQ message broker. Go to ActiveMQ_Install_dir/bin and run activemq.bat Also, the following ActiveMQ libraries must be copied to WSAS_HOME/repository/components/lib directory activeio-core-3.1-SNAPSHOT.jar (ActiveMQ_Install_dir\lib\optional) activemq-core-5.0.0.jar (ActiveMQ_Install_dir\lib\) geronimo-j2ee-management_1.0_spec-1.0.jar (ActiveMQ_Install_dir\lib\) geronimo-jms_1.1_spec-1.0.jar (ActiveMQ_Install_dir\lib\) Now, restart WSO2 WSAS Step 2 ------- Log in to WSAS management

WSO2 Carbon is among InfoWorlds best open source software

WSO2 has been named an InfoWorld 2009 Best of Open Source Software (Bossie) Award winner. Proud to be a member of the award winning team :)

Where to put third party jars in WSO2 WSAS?

In the pre-carbon versions of WSO2 WSAS (2.* and older), you may have used WSAS_HOME/lib/extensions directory to put third party jars such as jdbc drivers. After WSO2 WSAS became a part of WSO2 Carbon platform, a.k.a WSAS-3.* versions, all third party jars should be placed inside WSAS_HOME/repostiroy/components/lib directory of your WSAS distribution. **This is applicable to all WSO2 Carbon products (WSAS, ESB, G-reg, IS, BPS)

Remotely starting OSGI console when WSO2 Carbon runs on an application server

When WSO2 Carbon based product (WSAS, ESB, G-reg, BPS, IS) runs in standalone mode, you can start server with equinox OSGI console just by issuing -DosgiConsole system property. wso2server.bat -DosgiConsole How do you connect to OSGI console when you are running Carbon on an application server such as WebSphere or WebLogic (or tomcat, JBoss etc..)? 1. Open WEB-INF/web.xml file of the carbon web application 2. Uncomment the following element <init-param> <param-name>osgiConsole</param-name> <param-value>-console 19444</param-value> </init-param> 3. Now restart carbon with these settings. 4. Open a new command window/shell and connect to osgiConsole using telnet as follows telnet localhost 19444

How to deploy WSAS-3.X on Oracle WebLogic 10.3

WSO2 DOES NOT ENCOURAGE INSTALLING WSO2 APPLICATION SERVER (previously known as WSAS) ON TOP OF OTHER APPLICATION SERVERS. WSO2 HAS DECIDED TO DROP SUPPORT FOR WEBAPP DEPLOYMENT MODE OF THE WSO2 PLATFORM AND PRODUCTS. Once Azeez has written a 10 minute guide to installing WSO2 WSAS on Weblogic server . That guide explains the steps to deploy 2.X family of WSAS on weblogic. With the introduction of WSO2 Carbon platform in December 2008, WSO2 WSAS is no longer distributed as a separate war distribution. Hence, the instructions given in that document is not applicable when deploying WSO2 WSAS-3.X series on Oracle WebLogic server. Since all WSO2 java products are built on Carbon platform, users can configure running WSO2 products on any application server using a set of components included in binary distributions. I have already explained the steps to deploy WSO2 BPS on tomcat and WSO2 WSAS-3.X on Jboss . This post describes the steps to deploy WSO2 WSAS-3.X on WebLogic 10.3 Step1 Cre

Build your own server using WSO2 Carbon components

Building a customized server with a set of components downloading from a public repository ... It is no longer a hard and complex task. Now you can build your own version of WSO2 carbon platform using its Equinox P2 based provisioning capabilities. This post guide you through the steps to build your own server platform using WSO2 carbon-2.0.0. Pre-requisites: Download the latest version of WSO2 Carbon server. WSO2 Carbon is the base platform on which we build our customized server. Step 1 Start carbon server with osgiConsole so that we can issue commands to manage OSGI framework. cd CARBON_HOME/bin (CARBON_HOME is the location where you unzipped wso2server.bat -DosgiConsole Step 2 Next, we need to specify artifact and metadata repositories from which we download several features and their metadata. In the osgi console, issue the following commands. osgi>provaddrepo osgi>provaddartifactrepo

How to deploy CARBON based WSO2 products on non-ROOT web context

The latest versions of WSO2 carbon product family is available for download now. This version consists of a lot of feature enhancements and bug fixes. All products are free, no hidden costs! WSO2 Carbon based products (WSO2 WSAS, WSO2 ESB, WSO2 IS, WSO2 Governance Registry) can be deployed on any application server with minimum configuration steps. When you are setting up a web application on an application server, you must change the web context of web app. Even if you use WSO2 carbon based product in standalone mode, you may need to change the default ROOT web context. You can change the web context easily with two steps. 1. Open CARBON_HOME/conf/carbon.xml and change the following parameter. <WebContextRoot>/</WebContextRoot> CARBON_HOME is the location where you extracted the binary distribution. Suppose you need to change the web context of WSO2 WSAS to wsas. Then simply edit it as follows. <WebContextRoot>/wsas</WebContextRoot> 2. Now you need to rename

Business activity monitoring (BAM) with WSO2 Governance Registry

BAM refers to the aggregation, analysis, and presentation of real time information about activities inside organizations and involving customers and partners. The main benefits of BAM are to enable an enterprise to make better informed business decisions, quickly address problem areas, and re-position organizations to take full advantage of emerging opportunities. BAM solutions often present information on dash boards using various graphs. WSO2 Governance Registry provides with BAM functionality which enables users to aggregate various web services data and visualize them using dashboard gadgets. In this post, I'll describe how you can add a remote server for monitoring and generate graphs. Pre-requisites: Download and install (Unzip the binary) WSO2 Governance Registry-3.0.0-beta1 release from here We will refer to the unzipped directory, Greg_Home Step 1 Start WSO2 Governance Registry server by running wso2server.bat{sh} from Greg_Home/bin Step 2 Access the management console o

WSO2 SOA Summer School - Security in SOA

Prabath Siriwardana , a colleague at WSO2, doing a webinar on Security in SOA on 2nd of July 2009. You can register from here

Importance of defect isolation

A problem well stated is half solved True! A good bug report should provide with the information to reproduce the issue. It is QA tester's responsibility to specify the exact steps of bug recreation. Isolating the environment and conditions at which the issue occurred are extremely important components of a defect report. Sadly I have seen some people ignore these important practices due to tight schedules and rush testing processes. No! In any case, even with management push towards quicker feedback of the products under test, ignoring these vital practices are totally unacceptable. Your bug report mirrors the professionalism of software QA testing job. Developers do not waste time or jump in to assumptions by reading your bug report. It provides all the necessary details. It consists of logs, screen shots when they are required. A good QA tester must isolate the issue first. He never reports bugs just by seeing an exception in server console. He attempts multiple instances to rec

Run time code coverage using Emma

Emma is a free java code coverage tool which measures and reports code coverage of java based products. The most important and usable factor of Emma is, its ability to measure code coverage during the application runtime. At WSO2, we have been searching for a tool to get QA test coverage of our middleware products. Automated QA tests are executed against the binary products. Therefore, source level unit test coverage does not help to identify the figures of QA test coverage. Emma was the best tool which satisfied our requirements. The procedure is quite simple. Suppose you are going to get the coverage of a binary which obviously contains hundred of jars. First, you need to prepare a list of jars which requires to be instrumented. The list can be prepared easily in *nix environments as follows. xargs -n 1 $JAVA_HOME/jre/bin/java -cp emma.jar emma instr -m overwrite -cp < jarlist.txt This inserts tracking code to the jars listed in jarlist.txt. Now, you should restart your applicatio

How to deploy WSO2 WSAS-3.* on JBoss

WSO2 DOES NOT ENCOURAGE INSTALLING WSO2 APPLICATION SERVER (previously known as WSAS) ON TOP OF OTHER APPLICATION SERVERS. WSO2 HAS DECIDED TO DROP SUPPORT FOR WEBAPP DEPLOYMENT MODE OF THE WSO2 PLATFORM AND PRODUCTS. WSO2 WSAS can be deployed on most of the application servers with a simple set of configuration steps. This post describes the steps to deploy WSO2 WSAS-3.* on JBOSS 5.* Step 1 Download WSO2 WSAS-3.0.1 from here . Extract the downloaded zip into a directory. Copy conf, database, repository and resources directories in to a new folder. Here after, we will refer it is wsas-repo (i.e:- C:\wsas\wsas-repo) Step 2 Lets refer to your jboss installation directory, JBOSS_HOME. Go to JBOSS_HOME\server\default\deploy directory and create a new folder, wso2wsas.war. Now, copy wso2wsas-3.0.1\webapps\ROOT\WEB-INF to JBOSS_HOME\server\default\deploy\wso2wsas.war Step3 We need to enable https in JBOSS. Therefore, edit JBOSS_HOME\server\default\deploy\jbossweb.sar\server.xml by editing t

How to deploy a Java web service on WSO2 WSAS and secure it with Username token policy

I demonstrate how to deploy a java web service on WSAS and secure it with user name token policy.

How to preserve the original WSDL when requesting ?wsdl of an Axis2 web service

I have noticed a lot of queries in Axis2 forums on keeping the WSDL unchanged when issuing ?wsdl of a particular Axis2 web service. This can easily be achieved by setting useOriginalwsdl parameter to true in services.xml. Then Axis2 shows the wsdl file placed at the META-INF directory of service archive when requesting ?wsdl Suppose your Axis2 service archive (*.aar) includes a test.wsdl in the META-INF directory. Now, you deploy your Axis2 service and issue http://<host>:<port>/services/ ?wsdl. Then, Axis2 generates a wsdl instead of your own wsdl placed in your service archive. How do you avoid this behavior? Open your services.xml and add the following parameter. <parameter name="useOriginalwsdl">true</parameter> Now you will get the original wsdl when requesting ?wsdl of your service. Simple.. isn't it?

How to add FindBugs maven plugin to your project

FindBugs is a very useful static analyzer which inspects java bytecode for bug patterns. Static code inspection is important element in a good continuous integration process. Integrating FindBugs to your Maven build system is extremely simple as follows. 1. Add FindBugs maven2 plugin to the root pom of your maven project. You can add the plugin configuration element as a child of <reporting> element. <reporting> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.0</version> <configuration> <xmlOutput>true</xmlOutput> <xmlOutputDirectory>C:\projects</xmlOutputDirectory> </configuration> </plugin> </plugins> </reporting> Note: The xmlOutputDiectory is hard coded intentionally for demonstration purpose. 2. Go to the directory where

Automated testing of wso2 products using Selenium

I have never been a fan of open source UI test automation tools due to the annoying issues of majority of them. Most of the tools provides you with a good first user experience however fails when try to use in advanced use cases. At WSO2 , we have been looking for a test automation tool during the last few years. Due to the tight release schedules, we were not able to focus much on researches. At the end of 2008, WSO2 started to build its SOA product suite based on revolutionary Carbon platform and a new JSP based UI framework has been designed. When I got the initial builds of new WSO2 carbon products, I was curious about the possibility of automating user interface. I tried with one of the tools which we have tried once but never got a chance to continue working on. That is, Selenium ! For me, it is the best open source tool I have used so far in my career. After the releases of WSO2 carbon based products, we have started to automate UI and functional use cases using Selenium . We a

Adding BPEL features to WSO2 WSAS/ESB

A few days back, WSO2 has released carbon feature packs which allow users to integrate various functional components into their existing WSO2 products. I blogged about plugging in service hosting components into ESB while we were preparing for carbon release. With the carbon feature packs, now it is much more easier to add the functionalities what you want. WSO2 BPS provides the facilities to execute business processes written using the WS-BPEL standard. BPEL feature pack enables the business process management inside your WSO2 WSAS or ESB instances. Let's see how BPEL features can be added to WSO2 WSAS or ESB. Pre-requisites: Install WSO2 WSAS-3.0.1 or WSO2 ESB-2.0.1 Step 1 We are hoping to install BPEL features into WSAS or ESB. Therefore, download BPEL feature pack from here . Step 2 Unzip the downloaded feature pack into a directory in your file system (suppose it is $BPEL_feature_pack_home) You will see two sub directoris inside the extracted zip file, plugins and repos

Switching wso2 carbon server to maintenance mode

When wso2 carbon server (WSO2 WSAS, ESB, Registry and BPS) is running in production environments, it may be required to perform some essential upgrades without shutting down the server. [WSO2 Carbon is the base platform for all WSO2 Java products. wso2 carbon server refers to any of WSAS, ESB, Registry or BPS server] WSO2 Carbon based products are equipped with JMX based monitoring and management facilities, through which you can switch to maintenance mode. Step 1 In order to enable JMX management, you must uncomment the JMX port element in CARBON_HOME/conf/carbon.xml <Ports> <!-- The JMX Port --> <JMX>9999</JMX> </Ports> CARBON_HOME is the directory where you extracted wso2wsas-3.0, wso2esb-2.0, wso2-registry-2.0 or wso2-bps-1.0 binary distributions. Step 2 Start your WSO2 carbon server (WSAS, ESB, Registry or BPS). You will notice that the JMX service URL will be printed in the startup conso

How to deploy WSO2 BPS on Apache Tomcat

WSO2 DOES NOT ENCOURAGE INSTALLING WSO2 BPS ON TOP OF OTHER APPLICATION SERVERS. WSO2 HAS DECIDED TO DROP SUPPORT FOR WEBAPP DEPLOYMENT MODE OF THE WSO2 PLATFORM AND PRODUCTS. WSO2 Business Process Server (BPS) -1.0 is the latest member of WSO2 SOA platform. I have demonstrated a basic scenario using WSO2 BPS standalone distribution in a previous blog post . WSO2 BPS (and all other carbon based products) can be deployed in most of the servlet containers with a few configuration steps. Lets deploy WSO2 BPS on Apache tomcat 6.*. Step 1 Download WSO2 BPS-1.0 from here . Extract the downloaded zip into a directory. Copy conf, database, repository and resources directories in to a new folder. Say it is carbon-repo (i.e:- C:\bps\carbon-repo) Also, create a new directory, lib\extensions under carbon-home. Step 2 Lets refer to your tomcat installation directory, CATALINA_HOME. Go to CATALINA_HOME\webapps directory and create a new folder, bps. Now, copy wso2bps-1.0\webapps\ROOT\WEB-INF to C

Visits to this blog

The success of this blog can easily be determined by looking at the above summarized report of visitors who accessed during the last year. I have started this blog to discuss/share my ideas on software quality assurance and my subject domain, SOA/web services . The majority of the posts were written to help users to solve simple issues which were not documented anywhere. I do not use this blog to discuss my personal life, politics etc.. I was able to build a community around my blog during the last year which encouraged me to write more and more useful posts. Sometimes, I could not maintain a consistent blog post publishing rate due to the tight project release deadlines. However, it did not affect the visits of regular user base. With the releases of WSO2 's revolutionary SOA platform, Carbon , there will be a lot of things to be demonstrated. Stay tuned.. This blog will be updated frequently with more and more how-tos..

A quick look at WSO2 Business Process Server (BPS)

WSO2 Business Process Server (BPS) is the newest member of WSO2 SOA product suite. It is developed on top of the revolutionary WSO2 Carbon platform hence the components of WSO2 ESB, WSO2 Web services application server (WSAS) can easily be plugged in. WSO2 BPS provides the facilities to execute business processes written using the WS-BPEL standard. It uses Apache ODE as process server engine. I'm going to demonstrate how a simple BPEL package will be deployed in WSO2 BPS and some of the features such as process instance creation and process summary statistics. Step 1 Download WSO2 BPS-1.0 from here . Extract the downloaded zip into a directory. We will refer to the extracted location as BPS_HOME Step 2 Start business process server by running wso2server.bat{sh} which can be found at BPS_HOME/bin Step 3 Access BPS management console using https://localhost:9443/carbon. Log in to management console using the default administrator credentials, admin/admin BPS Home page will b

WSO2 Elevator Pitch

Short introduction to WSO2 from the founders....

Get your Axis2 service or module archives validated using WSO2 tools

When creating Axis2 service archives (AARs) or module archives (MARs), it is important to adhere to the defined archive structure and standards. With the help of automated tools, you can validate these archives. WSO2 service and module validators can be used to validate your service or module archives freely in an efficient manner. These tools are shipped as components inside WSO2 WSAS and hosted in WSO2 Oxygen tank developers portal as well. If you have WSO2 WSAS binary distribution , validating aar or mar files is a simple process as given below. 1. Access WSAS management console using http://localhost:9443/carbon 2. Select Service Validator in the left menu 3. Select your axis2 service archive (aar file) and click on Validate AAR 4. Validation report will be shown as given below. If WSAS binary distribution is not available, you can get your service or module validated using the online validator hosted in WSO2 Oxygen tank. 1. Go to 2. Click on Service Valida