Friday, March 21, 2008

10 best practices for your enterprise SOA

I know this a bit old article however in case if you have missed that , please have a look at


Thursday, March 20, 2008

Exposing a Database as a Web Service using Axis2

There are many ways to expose your database as a Web Service. And this topic becoming very popular as well. So I wrote an article explaining a simple way to expose your database as a Web Service.

Try it out you have all the sample source code you need to run the sample.

Tuesday, March 18, 2008

WSF/Spring Release 1.0 RC1

WSO2 WSF/Spring Development Team is please to let you all know that WSF/Spring
1.0 RC1 is out. Appreciate every ones contribution to test this.

WSO2 WSF/Spring provides a simple Code First approach to create Web Services
for the Spring user. This framework integrates the Apache Axis2 Web services
engine into Spring.

Now, with just a few entries in the application context, Spring users can
enjoy the benefits of Service Oriented Architecture using Web Services in
their applications.

* Support for exposing Spring services through the IOC container
* Support for editing Axis 2 booting configuration through the IOC
* Automated WSDL generation of Spring services
* Support for querying service's WSDL (with ?wsdl), schema (with ?xsd) and
policies (with ?policy)
* Deployment of Axis2 Modules (WS-Addressing, WS-Security, etc.) through
the classpath
* Method exclusion in Spring beans

Beta release is available at

WSO2 Web Services Framework for PHP v1.2.1 Released

WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source,
enterprise grade, PHP extension for providing and consuming Web Services in PHP.
WSO2 WSF/PHP is a complete solution for building and deploying Web services and is
the only PHP extension with the widest range of WS-* specification implementations.
It's Key features include, secure services and clients with WS-Security support,
binary attachments with MTOM, automatic WSDL generation (code first model),
WSDL mode for both services and clients (contract first model)
and interoperability with .NET and J2EE.

You can download the release from:

Project home page:

Key Features

1. Client API to consume Web services
* WSMessage class to handle message level options
* WSClient class with both one way and two way service invocation support
* Option of using functions in place of object oriented API with ws_request

2. Service API to provide Web services
* WSMessage class to handle message level options
* WSService class with support for both one way and two way operations
* Option of using functions in place of object oriented API with ws_reply

3. Attachments with MTOM
* Binary optimized
* Non-optimized (Base64 binary)

4. WS-Addressing
* Version 1.0
* Submission

5. WS-Security
* UsernameToken and Timestamp
* Encryption
* Signing
* WS-SecurityPolicy based configuration

6. WS-Reliable Messaging
* Single channel two way reliable messaging

7. WSDL Generation for Server Side
* WSDL generation based on annotations and function signatures, and
serving on ?wsdl or ?wsdl2 requests

8. WSDL mode support for both client and server side
* Write services and client based on a given WSDL
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode

9. REST Support
* Expose a single service script both as SOAP and REST service

10. Provide easy to use classes for common services
* Consume some well known services such as Yahoo search and Flickr
and Amazon services using predefined classes

Experimental Features

11. wsdl2php.php script. This script can generate PHP classes for services
and clients for a given WSDL to be used with WSDL Mode .

Major Changes Since Last Release
1. MTOM implementation improved to send large attachments.
2. wsdl2php.php script added to help generate PHP classes to be used with WSDL mode.
3. WSDL mode classmap support added for services.
4. WSDL mode support for arrays added.
5. Improved API to let the user access SOAP Headers from service scripts.
6. WSDL generation for services improved with support for PHP classes.
7. Improvements to documentation.
8. Many bug fixes.

Reporting Problems
Issues can be reported using the public JIRA available at:

Contact Us

Please subscribe to our user or developer mailing lists. For details on how
to subscribe please visit:

Monday, March 10, 2008

Apache Synapse / WSO2 ESB Community Site (beta)

WSO2 announced the launch of the Apache Synapse and the WSO2 ESB user community site -!

We hope that this will help us build a vibrant community around our users and developers, and help our community to share their experiences, extensions, articles, case studies, screen casts, patches and many more artifacts and resources related to these open source ESB's.

You can sign up as a member, and begin to upload your custom extensions, or article and code snippets etc, and rate content uploaded by fellow users. In the future, the Synpase developer community would also publish some of the extensions over the community site, which will allow users to update their installations with new functionality. The community site will also feature patches for released versions of the ESB's as well as link to articles and screen casts and FAQ's of interest.

mediators Mediators
  • EJB Callout Mediator
  • URLRewrite Mediator
  • Java Rule (JSR-94) Mediator
  • Smooks Transform Mediator
  • IM Mediator

Summaries Article and Screencast summaries
  • Apache Synapse / WSO2 ESB Performance against Mule and Service Mix [Article]
  • Apache Synapse / WSO2 ESB Performance against the leading commercial ESB [Article]
  • HMO Case Study using the WSO2 ESB [Case study]
  • Exposing EJB and WS Repositories using Service Aggregation, Utilizing WSO2's Open Source ESB [Case study]
  • Stepping into Apache Synapse [Article]
  • Bridging from HTTP and WS-Security to JMS with the WSO2 ESB [Screencast]
  • Simple Proxy Services with the WSO2 ESB [Screencast]

XSLTs Sample XSLTs
  • Identity transformation with a namespace change

XPath Sample XPaths
  • Selecting over both SOAP 1.1 and 1.2

Configurations Sample Configurations
  • Using Clone and Aggregate mediators and using XSLT's for selecting the highest quote
FAQs FAQ for Apache Synapse and WSO2 ESB

Patches Patches for Apache Synapse and WSO2 ESB

Monday, March 03, 2008

Java2WSDL generation with custom schema - Axis2

Today I implemented a way to provide a custom schema when you generate WSDL from a Java class. In order to give a custom schema file you need to use the option

  • csl “location of the schema file”

In addition to that you can feed the mapping file to use your custom schema , then you have to give the full qualified class name and the schema Qname you can feed the mapping file using following option.

  • mfl – “Location of the mapping file”

Structure of the mapping file look like below;||ErrorMessage

[You can have any number of above entries]

Then if your class is something like below;



public class MyClass {

public String doFoo(String foo) throws FooException {

return foo;



Will generate the correct WSDL file using the mapping file as well as using the custom schema.