Everything form engineering, architecture, SOA, Cloud Computing, SOAP, REST, economy to general life.

Monday, December 31, 2007

7 oh heaven! 8 the might!!

It is over, 2007. Today is the last day of the year and also my second wedding anniversary. Married for 2 years.

2007 has been a memorable year. The first thing that comes to my mind, looking back, is that I broke my left ankle in February. For about three months I could not walk. This is the first time ever in my life that one of my bones were broken. It got worse, because I did not think that it was broken in the first place and I was late to go for treatment. That was a lesson. And I also learnt how kind our people are for someone who cannot walk. Very many people who never knew me helped me a lot, including taxi drivers, security guards etc. It was a true lesson on Sri Lankan hospitality.

I also learned some tough lessons in this year in my married life, though it was only the second year of marriage. Put it short, being the "good guy" simply does not work at times.

2007 is also historical for me in that I broke the record for the longest stay with a single company. I passed the second year with WSO2 in September.

This year was an year of many achievements. One of the key was releasing Apache Axis2/C 1.0 and also WSO2 WSF/C and WSO2 WSF/PHP 1.0 releases. I have spent many hours working on them. Sometimes I worked about 18 hours a day, specially when my leg was broken and I had nothing else to do. I am very happy about how these project came to mature this year. I remember the hours and hours that I spent with gdb and valgrind to straight things up. All those tireless hours started to blossom this year.

The thing that I enjoyed most in 2007 was watching my son grow. All the pains in life just disappear watching the kid.

Despite all the hardships of 2007, it is the most successful year in my life. So successful that I know that 2008 is going to be better. Not that I hope that 2008 is better, but I know. That is the spirit of life; All the bad is past, present is the best so far, future will be better.

Thursday, December 27, 2007

I am Having a Break

I am a bit silent these days. I am having a break. Playing with my son a bit. Last few days, when I sit in front of the screen, he drags me away to play.

However, I barely managed to come up with a rough outline for the set of articles that I am going to write on WSF/PHP. I am not sure if I would be able to finish at least one before the end of this year, I was planing to write at least couple by that time.

Sunday, December 23, 2007

Saturday, December 22, 2007

Secret Santa form WSO2

It is not yet publicly announced, but if you want some secret gifts form Santa this Christmas, you have Web services framework for C 1.2.0, Web services framework for PHP 1.2.0 and Web services framework for Ruby 1.0.0 from WSO2 packed and ready to be used. 

Enjoy this Christmas with happy service scripting :)

Thursday, December 20, 2007

REST and WS-*

Many people talk about REST vs. WS-*; but a few about REST and WS-*.

In fact, I believe the right and more practical model in real world is to use them both based on the needs. Hence, when looking for tools, it would be ideal if you could do both with the same tool.

WSO2 Web services frameworks for C, PHP and Ruby provides that luxury, because the enabling open source project, Apache Axis2/C, can do that.

Wednesday, December 19, 2007

Why PHP Web Services?

I was wondering, why should one bother about SOAP Web services in PHP? Why can't you use REST and be done with it?

Well, the key is security. Using https you can get end to end, but with WS-Security, you can secure the full message, beyond the transport level. Hence it is harder to crack. And quite customizable as well.

Tuesday, December 18, 2007

Secured Web Services with PHP

Read this article to learn how to use WS-Security with PHP.

Monday, December 17, 2007

We are Packing, be Ready!!!

Today, WSO2 Web services framework for C 1.2.0 branch was created. Source release artifacts are already in place.

PHP and Ruby will soon follow.

Be ready for the excitement!!!

Sunday, December 16, 2007

Power of Open Source Community Aspect

A kid named Spencer Davis contributed some feedback on Apache Axis2/C documentation. He is now going to compose a FAQ for Apache Axis2/C, the second task that he is going to work as part of his GHOP involvement.

First of all, I am personally delighted that he chose to work on some of the tasks that I proposed and that he has already completed one successfully. More importantly, I am excited that he is engaging the open source community and interacting with the community. I am sure, he is learning form the open source project and the community aspect. The project too benefits form his contributions. So it is a mutual benefit. The fact that it was an open community and that this student could join and contribute shows the beauty of open source.

Thanks to Google who connected students with open source communities.

It is Time to Switch to Web Services Framework for PHP

Are you still using PHP5 SOAP extension for PHP Web services? If so, it is time to switch to WSO2 Web services Framework for PHP. What are you going to miss if you switch? Nothing, because it is written in C, it is a PHP extension, it is free & open source  and it works with PHP5. In other words, all the key characteristics of PHP5 SOAP extension is there in WSO2 WSF/PHP.

Now to the interesting question. What would you gain by using WSO2 WSF/PHP? A lot. Easy to use API, addressing, binary attachments, Web services security, Web services reliability, WSDL generation to name a few. And most importantly it is SOA ready.

Enjoy the power of Web services.

Saturday, December 15, 2007

WSO2 WSF/C and WSF/PHP Interoperates with Microsoft's WCF

Web services tools are of no use if they cannot interoperate with heterogeneous implementations. In the latest tests WSO2 WSF/C and WSO2 WSF/PHP successfully interoperated  with Microsoft WCF in the following areas:

  • SOAP, WSDL, and MTOM
  • WS-Security
  • WS-Addressing
  • WS-Policy and WS-SecurityPolicy

WS-ReliableMessaging was successful in one way scenario, and there are some issues to be fixed in two way scenarios.

Friday, December 14, 2007

WSO2 Identity Solution 1.0

WSO2 Identity Solution version 1.0 has been released.

WSO2 Identity Solution provides a set of Relying Party components and an Identity Provider to enable CardSpace authentication for Web applications. This release also comes with extensions for Drupal and MediaWiki.

Thursday, December 13, 2007

Fun with Function Pointers

We are into the final weeks of 2007 and also into the final set of releases for this year from WSO2 C team.

Since we are going to be on year end holidays the week after next, we have to run fast to see the end of the release cycles.

I spent half the day yesterday and almost the whole day today trying to figure out a server side bug with Ruby extension but made no progress.

Finally  Janapriya has found the bug and fixed it and the culprit was calling convention with some function pointers. Nither valgrind not Rational Purify could point to the problem. That is the fun side of C, a single word, not even a line of code, a single macro name, can make you wonder like a cloud with no clue for days.

WSO2 Guys are Something Else in Open Source

Speaking of the WSO2 Mashup Server, those folk over at the community site virtually fall over each other to help newbies. I knew that Open Source communities were friendly, but these guys are something else. Thanks for all your help, Keith and Jonathan. I'm in shock and awe both at your enthusiastic support and the blistering pace of WSO2 development in general.

That is according to Ganesh Prasad.

Wednesday, December 12, 2007

Integrating PHP into Your SOA Solutions

Web services is one of the best available technologies for implementing SOA. In fact Web services are the most widely used methodology in SOA. Now, what if you want to use the programming language of your choice as the implementation technology? Would Microsoft .NET, with its CLR be the only solution?

Not at all. Now you can afford to use PHP with your SOA solutions. You may wonder, does PHP has a comprehensive framework for Web services? Yes there is and that is PHP Web services framework by WSO2.

OK, but how about the ability to interoperate with other implementations technologies that might have been used in the SOA solution, such as .NET or J2EE? Well, with WSF/PHP, you do not have to worry about interoperability. It has been tested and proven to work.

Monday, December 10, 2007

Reclaiming the ESB

Paul has written an article that talks about how the term ESB has been waylaid, hijacked and generally misused.

Read the Reclaiming the ESB article.

Sunday, December 9, 2007

WSDL Generation with PHP Web Services

The PHP Web services framework, WSO2 WSF/PHP, has support for one of the most sought after features in PHP Web services arena, the WSDL generation capability.

You can generate either WSDL 1.1 or WSDL 2.0, for any Web service, written using WSService class. One can use documentation comments to specify the operation characteristics, and those would be picked by the WSDL generator.

Here is an example of such a doc comment:


/**
* The purchaseOrder function
* @param int $itemNo ID of the item to be purchased
* (maps to the xs:int XML schema type )
* @param string $date Date that the purchase order was done
* (maps to the xs:gDate XML schema type)
* @return int $price tolal price
* (maps to the xs:nonNegativeInteger schema type )
*/
function purchaseOrder ($itemNo, $date)
{
// some logic
return $Price;
}

If you do not provide any doc comments for the operations, still a WSDL would be generated, assuming XSD:Any as the default type.

You can generate the WSDL by suffixing the service endpoint address with '?wsdl' for WSDL 1.1 and '?wsdl2' for WSDL 2.0.

If you are interested, have a look at the WSDL generation API documentation.

Saturday, December 8, 2007

Web Services on Command Line

Can Web services be consumed on Command line? Yes you can. But how? Well, you can post an XML document using wget to the service. Well, what if you want to use WS-Addressing or WS-Security? Well then you can use wsclient that comes with WSO2 WSF/C.

What is wsclient? It is a program that be used as a Web services client. It can do both REST as well as SOAP calls. More over, it can deal with WS-Addressing, WS-Security as well as binary attachments.

Here is a very simple example on consuming Yahoo search with REST API

1. Save the following request XML payload to ysearch.xml file

<webSearch>
    <appid>WSClientDemo</appid>
    <query>WSO2 WSF/C</query>
    <form/>
</webSearch>

2. Run the wsclient command

wsclient.exe -get http://search.yahooapis.com/WebSearchService/V1/webSearch < ysearch.xml

It is as simple as that.

There are samples that shows hot to consume the Flicker API both using REST as well as SOAP.

The key advantage of wsclient, is that, you can use that in shell scripting, the way you would do with other familiar command line programs. Shell scripts, batch files, and even scripts written in scripting languages like Perl could call the program.

wssclients could integrate geeks and power users to SOA :-)

Thursday, December 6, 2007

Want to Download Flash?

This link would be useful. I used the steps listed under "Firefox for Geeks and Power Users" subtitle.

Trying User Shoes

As Developers, we often forget the user perspective. We forget that we write the docs or samples for users, and not for us. So we "assume" stuff. But if you try to wear the user shoes (or hat for that matter) and go through the docs or samples, you are sure to find so many issues. Many many issues, I assure you.

So always remember the poor users. That is one of the secrets if you want success with open source software. And that is the secret of success with Microsoft.