Thursday, July 17, 2008

Scripting support with Axis2

As we all know Apache Axis2 is a Java based Web service framework. In addition to that Axis2 is becoming as the de facto Java based Web service framework. Which is obvious when we look at the number of daily downloads as well as a number of companies who use Axis2. It took about four years to come to this position with great support from the community.

Now we can find a number of scripting languages which run on JVM. If a scripting language is running on the JVM then we can easily write scripting extension to Axis2. At the moment Axis2 has scripting extensions for;

Meaning of language extension is , one can deploy scripting services in Axis2 as well as one can use scripting language to invoke or access a service deploy in anywhere.

With the Axis2 architecture , we can easily plug a new language extension. It is just a matter of writing few components and registry in Axis2.

  • Deployer – to process the scripting file and create a Web service from that
  • Schema generator – Generating schema from the scripting class , for example if we are deploying a JS file , then generate corresponding WSDL
  • Message Receiver – when a message receive for that particular service , it will first come to the message receiver and that will invoke the scripting class and send the response if any.
Registering an extension in Axis2 is just a matter of adding your custom deployer in to axis2.xml.

Monday, July 14, 2008

Spring Web services and Axis2

As you know Axis2 is a Web service framework which has support many things. It has support for scripting languages , it has support for data services and it has support for EJB , Corba and etc. In addition that since a long time it has support for Spring as well. With that you can deploy Spring bean as Web services in Axis2. Yes I agree it is yet another way of getting the thing done. I also realized that is not enough for spring developers. They need everything works on spring.

To solve that in WSO2 we came up with a solution where we have integrated Axis2 into Spring. When doing this we have convert all the axis2 configurations files into bean descriptors , for example we came up with a set of beans for axis2.xml. With this we have integrated Axis2 smoothly into Spring. After thing anyone can easily expose a bean as a Web service. And get the power of all the other WS* support , such as security , reliability etc. , above all you can get the power of Axis2 while you are in spring container.


With this approach you can make a bean into a Web service just using following line of codes



<bean id="services" class="org.wso2.spring.ws.WebServices">
<property name="services">
<list>
<bean id="helloService" class="org.wso2.spring.ws.SpringWebService">
<property name="serviceBean" ref="helloworld"></property>
<property name="serviceName" value="helloWorldService"></property>
</bean>
</list>
</property>
</bean>

You can read more about Spring support from the following links

WSO2 Web Services Framework for Spring

Hello World with WSO2 WSF/Spring

Sunday, July 13, 2008

Announcing: New Google C++ Testing Framework

The folks at Google have recently open-sourced their xUnit-based testing framework for C++ development. The framework is said by project developer Zhanyong Wan to have been in use internally at Google for years by thousands of their C++ developers.

Read the full story

Multiple source directories with maven2

Without any doubt I can tell that Maven and Maven2 are very powerful project management tool, specially very useful for project building.

As I remember correct in maven1 it had a way to add multiple source directories , however when I switch to maven2 , I found that it does not have support for multiple source directories by default. Recently I got the requirement of adding multiple source directories for WSO2 Registry sample module. That module has few sub directories and I do not need to treat them as module. What I wanted was to add them as source directories in the sample module. So when I do the googling I found a very cool maven pluging called “build-helper-maven-plugin” , which helps us to add multiple source directory to a single module.

Structure of the sample module is as follow;


samples
-- handler-sample
--src
-- filebased-sample
--src
-- wsdl-sample
-- src
-- collection-handler-sample
-- src
-- custom-ui-sample1
-- src

So the corresponding pluging configuration is as follows



<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>handler-sample/src</source>
<source>filebased-sample/src</source>
<source>wsdl-sample/src</source>
<source>collection-handler-sample/src</source>
<source>custom-ui-sample1/src</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>

Friday, July 11, 2008

Failures in Agile Develoment

As Agilists we love to talk about our successes but its much harder to talk about failure.

Read the full story

Thursday, July 10, 2008

Apache ODE 1.2 Release

The Apache ODE community is proud to announce its latest 1.2 release
that includes many new features, improvements and bug fixes. Apache ODE
is a WS-BPEL compliant web services orchestration engine. It organizes
web services calls following a process description written in the BPEL
XML grammar. Another way to describe it would be a web-service capable
workflow engine.

Highlights of this release:

* External variables: variables used in a process are not opaque to
the outside world anymore. You can map them to a simple database table
and manipulate them directly.
* Support for the WSDL HTTP binding. We've also added a few
extensions, allowing the invocation of REST-style web services.
* Advanced endpoint configuration which, thanks to the integration
with Apache Axis2, enables WS-Security and WS-RM support.
* A long list of small fixes and improvements for best-of-breed
stability, performance and usability.

In addition to these new features, Apache ODE provides the following
functionalities:

* Side-by-side support for both the WS-BPEL 2.0 OASIS standard and the
legacy BPEL4WS 1.1 vendor specification.
* Supports 2 communication layers: one based on Axis2 (Web Services
http transport) and another one based on the JBI standard (using
ServiceMix).
* High level API to the engine that allows you to integrate the core
with virtually any communication layer.
* Hot-deployment of your processes.
* Compiled approach to BPEL that provides detailed analysis and
validation at the command line or at deployment.
* Management interface for processes, instances and messages.

For more information, check the Apache ODE website: http://ode.apache.org/.

Apache ODE is an open source project released under a business-friendly
license (Apache License v2.0), as such we welcome all your help and
contributions. To participate and get involved, our mailing lists are
the best resources to start from: http://ode.apache.org/mailing-lists.html

SOA triple play: Policy meets Semantic Web

Triples, a programming grammar developed by W3C for its Semantic Web initiative, is incorporated into WSO2's newly released Registry 1.1. The open source SOA vendor is moving toward a triples-based language that will allow users to encode their own governance rules and policies.

Full story

Wednesday, July 09, 2008

Google open-sources data exchange language

"Google uses "thousands of different data formats to represent networked messages between servers, index records in repositories, geospatial datasets, and more," wrote Kenton Varda, a member of Google's software engineering team, in a blog post. "Most of these formats are structured, not flat. This raises an important question: How do we encode it all?""

Read full story.

Let's wait and see how we can use these in our applications .

Tuesday, July 08, 2008

SOA and Open source ESB

As I have mentioned in my previous posts , SOA is becoming the next generation of the IT industry. Not only that Web services provide major contribution to that. Just having Web services does not make SOA complete. There are a number of factors which are necessary for making SOA complete , or moving company into so called SOA.

When a company want to move into Web services , one of the first thing they need to focus on is the web service framework they are going to use. There are number of good open source and commercial web services frameworks around , you can pick one which match with your requirement and then enable Web services in your company. If you are looking for an open source solution then Apache Axis2 would be a good candidate. I am not recommending Axis2 , since I am an Axis2 developer , but it so extensible , flexible as well as easy to use , above all it inteoperates with other open source and commercial web services stacks.

In one of my previous post I mentioned about one of the other key part of SOA , which is SOA registry. And recently I did a feature comparison on WSO2 registry as well as Mule Galaxy.

Next major component which make SOA complete is ESB or Enterprise Service Bus. There is no clear definition for ESB , different people have different opinions on that. In my view ESB is a bus which connect different kind of applications together and provide a way to talk to them in application independent manner. Web service provide right infrastructure for that providing SOAP based interaction. With ESB one can talk to different kind of applications and can connect different kind of applications. For example we can connect data service , main frames and messaging queue together using an ESB.

The requirement of ESB depends on the type of application you have , if you have just Web service application then you might not need an ESB, however if you have different kind of applications (say Java and non-Java applications) , then to connect such application we need an ESB.

There are a number of ESB out there , and you can find both commercial and open source ESBs. It is not surprise to see that open source ESB performs better than some of the commercial ESBs. WSO2 recently did a performance comparison , you can read them and make your decision. In Apace domain , there are two ESBs , Apache Synapse and Apache ServiceMix.

Apache Synapse (or WSO2 ESB) is built on Axis2 and ServiceMix is built on CXF. I like Apache synapse due to few reasons , first it is built on Axis2. Second I was able to write the very first synapse toy based on the current architecture , third it seems to be the fastest ESB.