Wednesday, December 02, 2009
Thursday, November 19, 2009
WSO2 SOA Platform Enters in to the Cloud
WSO2 announced the launch of their SOA platform inside the Cloud earlier this week. With this launch, you can try out and use their comprehensive SOA platform inside the cloud.
WSO2 Cloud Platform consists of various products, including
WSO2 Cloud Platform consists of various products, including
- WSO2 Cloud Virtual Machines: All WSO2 Java products are now available as
- Amazon Machine Images (AMIs). Visit the 'Getting Started' tutorial from Getting Started with WSO2 Cloud Virtual Machines for Amazon EC2
- VMWare/VMWare VSX and KVM images. Visit the tutorial, Getting Started with WSO2 VMWare Images.
- WSO2 Cloud Connectors:
- WSO2 Cloud Service Gateway - A manage and secured gateway between the services in your Enterprise and the cloud. Visit Introducing WSO2 Cloud Services Gateway for a comprehensive tutorial.
- WSO2 Service Accelerator - Accelerate the processing of WS-Security and WS-Reliable Messaging using WSO2 Web Service Framework for C++.
- WSO2 Cloud Services: Providing WSO2 Products as Services following the Software as a Service (SaaS) Model.
- WSO2 Governance as a Service: Hosted instance of WSO2 Governance Registry with multi-tenant support. You can try out the software from https://governance.cloud.wso2.com. Visit Getting Started With WSO2 Governance as a Service and FAQ for more information.
Tuesday, October 27, 2009
Tuesday, October 13, 2009
WSO2 SOA Workshop 2009, Santa Clara, CA
WSO2 is hosting a SOA Workshop in Santa Clara, California in November 3rd 2009. You will be able to attend to the following sessions covered by the industry leading experts in SOA.
Visit here to find more details about the event, http://wso2.com/events/2009-us-soa-workshop/?soaotad=10072009
- ESBS and SOA
- SOA Security
- Mashups and Business Process Management for SOA
- SOA Governance
- SOA with C, C++, PHP
- SOA Architecture Pattern
Visit here to find more details about the event, http://wso2.com/events/2009-us-soa-workshop/?soaotad=10072009
Labels:
bps,
carbon,
esb,
Governance,
Governance Registry,
mashup server,
SOA,
SOA Governance,
Workshop,
WSO2
WSO2 Releases Goernance Registry 3.0.1, ESB 2.1.1, WSAS 3.1.1, IS 2.0.1 AND Mashup Server 2.0.0
WSO2 announced an another round of release of their famous SOA products.
Although the version numbers say this is minor patch release (Other than the Mashup Server which is shipping as a major release), in fact there are new features and improvements. Some basic new features shares among all of these products are
- WSO2 Governance Registry 3.0.1
- WSO2 ESB 2.1.1
- WOS2 Web Services Application Server (WSAS) 3.1.1
- WSO2 Identity Server (IS) 2.0.1
- WSO2 Mashup Server 2.0.0
Although the version numbers say this is minor patch release (Other than the Mashup Server which is shipping as a major release), in fact there are new features and improvements. Some basic new features shares among all of these products are
- Improved registry level transaction Support.
- Improved Support for deploying on top of Application Servers other than tomcat like WebSphere, WebLogic, and
JBoss. - Support for Eclipse P2 based provisioning. (Yes, you can add/remove features from these WSO2 products , see https://wso2.org/wiki/display/carbon/p2-based-provisioning-support for more details)
- Improved Remote Registry model
Labels:
carbon,
esb,
Governance,
Governance Registry,
identity,
mashup,
mashup server,
registry,
release,
SOA,
SQL,
web services,
wsas,
WSO2
Monday, August 24, 2009
WSO2 Releases Eclipse IDE Tooling for WSAS and BPS
Saminda Wijerathna the lead of the WSO2 tooling team, announced the release of a new version of IDE tools for WSO2 WSAS and BPS. These tools will help you to write web services or web service clients and test them within your Eclipse IDE.
You can download the tools and the related documentation from http://wso2.org/downloads/tools/eclipse.
Here are the key features of the set of IDE tools,
You can download the tools and the related documentation from http://wso2.org/downloads/tools/eclipse.
Here are the key features of the set of IDE tools,
- Create Web services
- Create web service client
- Convert WSDL 1.1 to 2.0
- Module and service validators
- Creating wsdl from a java class
- Create Axis2 archives
- Hot update a Web service
- Debug Web services
- Test Web services
- Conversion of WSDL 1.1 to 2.0 can now be done vice versa as well.
- Creating Bpel archives for deploy
- Start WSAS 3.0.x inside Eclipse
- Run multiple instances of WSAS inside eclipse
Labels:
bps,
eclipse,
eclipse tools,
SOA,
Tools,
web services,
wsas,
WSO2
Wednesday, July 29, 2009
WSO2 Releases Web Service Framework For C++
WSO2 announced the release of the Web Services Framework for C++ (WSF/C++) version 2.0.0. Similar to WSF/PHP which is really popular among the PHP community, WSF/CPP is the C++ language binding for the Apache Axis2/C and the other supporting web services projects like Apache Sandesha/C, Apache Rampart/C.
With this release C++ developers will be able to write web services and web service clients to inter-op with .NET/Java/PHP or any other platform built-on web service standards. The release is shiped with a code generation tool that will be used to generate the code for skeletons and stubs from a WSDL, so developers only need to concentrate on their business logic as the generated code will take care of building or parsing xmls and running them on top of the framework.
Here are the key features of the new release.
As a side note, you will be able to participate to a free summer school training session on the WSF/CPP conducted by Nandika Jayawardane who is the project lead of both WSF/CPP and WSF/PHP on 30th July. You can register to it (for free) from here.
With this release C++ developers will be able to write web services and web service clients to inter-op with .NET/Java/PHP or any other platform built-on web service standards. The release is shiped with a code generation tool that will be used to generate the code for skeletons and stubs from a WSDL, so developers only need to concentrate on their business logic as the generated code will take care of building or parsing xmls and running them on top of the framework.
Here are the key features of the new release.
- Support core web service standards like SOAP 1.1, SOAP 1.2, WSDL 1.1, WSDL 2.0, REST
- Support for web services QoS specifications.
- WS-Addressing
- WS-Security
- WS-Policy
- WS-Security-Policy
- WS-Reliable-Messaging
- Support binary attachment with MTOM and SWA (With the Support for large binaries)
- Code generation tool.
- Proven interoperability with .NET.
As a side note, you will be able to participate to a free summer school training session on the WSF/CPP conducted by Nandika Jayawardane who is the project lead of both WSF/CPP and WSF/PHP on 30th July. You can register to it (for free) from here.
Sunday, July 12, 2009
WSO2 Governance Registry 3.0.0 - What's New?
WSO2 Governance Registry (G-Reg) (Formally known as WSO2 Registry) is released its 3.0.0 version along with two other sibling WSO2 products, WSAS 3.1.0 and ESB 2.1.0. This is a major release specially for WSO2 Governance Registry as it contain number of new features and improvements.
1. The New Name - s/Registry/Governance Registry
The product name itself changed from 'Registry' to 'Governance Registry' (abbreviated as 'G-Reg'). As it may hint you, now the product is more focused on the 'Governance' aspects than just the 'registry' or a 'repository' aspects. In early releases, it mainly used to store, retrieve configurations and persistence data that the other products would need. Now you can govern these resources (Services, Policies, Processes, People) inside the G-Reg itself. It has emerged to become a complete tool that help you in governing your SOA platform.
2. Separate Views for Add/View/Remove Services
In G-Reg 'Services' along with Service MetaData (policies, wsdls, schemas) are distinguished from other resources, as they are the key resources in a SOA platform. You will be able to add/list/view services directly from the main menu in the G-Reg UI.
[caption id="attachment_1004" align="aligncenter" width="228" caption="Add Service Metadata"]
[/caption]
When adding a service you will be prompted to provide additional details on the services. As they will help users in discovering these services. The fields of these details are configurable as you will change them according to the policies and requirements of your organizations, but the defaults will be adequate for most of the scenarios. Additionally G-Reg will do WS-I validation as you add WSDLs, Schemas.
Note that this is an additional view you will get as you can still discover services on a tree view arranged according to their namespaces using the registry browser as in previous releases.
3. Service Life cycle Management with Check-lists
Managing service lifecycle is a core part of governing services. G-Reg provides you this functionality with a simple user interface.

Lifecycle states can be promoted or demoted. The state transition can be 'Designing' -> 'Developing' -> 'Testing' -> 'Deployed'. You can enforce a validation of a checklist in promoting the state to the next level. This states and the associated check-list items are highly configurable as you will change them to suit to the process of your organizations as you wish.
And G-Reg is shipped with a sample that extend the lifecycle management functionality by making it distributed. In there as you promote or demote the state, the service resource will move its position. The user guide on 'Distributed Life Cycle Management Sample' will describe how to use this functionality in more details. This will be really useful if you are enforcing a structured permission model in managing lifecycles. For an example you can enforce only developer role will be able to modify, check or promote a service in the 'Developing' state and QA role has permission in promoting a service in 'Testing' state and so on.
4. Business Activity Monitoring (BAM)
This is a brand new feature provide in G-Reg. You may find the user guide on 'BAM' will be really helpful in configuring the servers you want to monitor. But in order to view the monitoring data you have to go to the dashboard, which is the next new feature.
5. Dashboard
For most of the you, this will be the coolest feature in the new G-Reg., an eye-catching dashboard filled with bunch of Gadgets.
[caption id="attachment_1007" align="aligncenter" width="753" caption="Dashboard"]
[/caption]
The dashboard provides you the information related to runtime governance as well as design-time governance as described in the 'Dashboard' user guide.
6. Eventing and Notifications
If you want you to notified when a resource is updated or a lifecycle state of a service is changed, this feature will be really helpful. Look at the 'Eventing and Notifications' user guide on how you can get notified and the built-in events that you can listen.
7. Mount Remote Resources - Federating Registries
If you are maintaining two separate registry instances, this feature will enable you to share resources among them. In G-Reg you can create links to resources in remote registries (remote-links) as well as to the resources in the same registry (sym-links). Here is the user guide for 'Sym Links and Remote Links' to read more details of the subject.
8. User Profiles
The new G-Reg has the ability to keep multiple user profiles per user. A simple how to on creating profiles can be found in the user guide on 'User Profiles'.
9. Checkin/Checkout with Local Filesystem
The new G-Reg is shipped with a command line tool that allows you to checkin and checkout registry resources with your local filesystem. If you are familiar with a version control system like subversion, the checkin/checkout commands will not be much difficult to you.
Checking out a resource is simple as (the following command is what you typed in linux, in windows you will use the checkin-client.bat instead).
And to checkin,
Similarly you can use this tool to create backups or move resource or resource hierarchy off-line. Here is a complete user guide on 'Checkin-Client'.
10. Performance Boost
Last but not least, the new G-Reg is performing very fast than its predecessor. In the performance test, it was seen each primitive operation in the registry is at least 10% faster in this release, where as some operations are performing much faster (for an example, 'Add Collection' operation seemed 50% faster). And the remote registry calls also optimized by keeping a local cache (http-level-caching).
This was a list of most notable new features in addition to the bunch of the features that was already there in the previous releases. You will be able to download WSO2 Governance Registry freely from the product website, http://wso2.org/projects/governance-registry and evaulate these features as you want.
1. The New Name - s/Registry/Governance Registry
The product name itself changed from 'Registry' to 'Governance Registry' (abbreviated as 'G-Reg'). As it may hint you, now the product is more focused on the 'Governance' aspects than just the 'registry' or a 'repository' aspects. In early releases, it mainly used to store, retrieve configurations and persistence data that the other products would need. Now you can govern these resources (Services, Policies, Processes, People) inside the G-Reg itself. It has emerged to become a complete tool that help you in governing your SOA platform.
2. Separate Views for Add/View/Remove Services
In G-Reg 'Services' along with Service MetaData (policies, wsdls, schemas) are distinguished from other resources, as they are the key resources in a SOA platform. You will be able to add/list/view services directly from the main menu in the G-Reg UI.
[caption id="attachment_1004" align="aligncenter" width="228" caption="Add Service Metadata"]
When adding a service you will be prompted to provide additional details on the services. As they will help users in discovering these services. The fields of these details are configurable as you will change them according to the policies and requirements of your organizations, but the defaults will be adequate for most of the scenarios. Additionally G-Reg will do WS-I validation as you add WSDLs, Schemas.
Note that this is an additional view you will get as you can still discover services on a tree view arranged according to their namespaces using the registry browser as in previous releases.
3. Service Life cycle Management with Check-lists
Managing service lifecycle is a core part of governing services. G-Reg provides you this functionality with a simple user interface.
Lifecycle states can be promoted or demoted. The state transition can be 'Designing' -> 'Developing' -> 'Testing' -> 'Deployed'. You can enforce a validation of a checklist in promoting the state to the next level. This states and the associated check-list items are highly configurable as you will change them to suit to the process of your organizations as you wish.
And G-Reg is shipped with a sample that extend the lifecycle management functionality by making it distributed. In there as you promote or demote the state, the service resource will move its position. The user guide on 'Distributed Life Cycle Management Sample' will describe how to use this functionality in more details. This will be really useful if you are enforcing a structured permission model in managing lifecycles. For an example you can enforce only developer role will be able to modify, check or promote a service in the 'Developing' state and QA role has permission in promoting a service in 'Testing' state and so on.
4. Business Activity Monitoring (BAM)
This is a brand new feature provide in G-Reg. You may find the user guide on 'BAM' will be really helpful in configuring the servers you want to monitor. But in order to view the monitoring data you have to go to the dashboard, which is the next new feature.
5. Dashboard
For most of the you, this will be the coolest feature in the new G-Reg., an eye-catching dashboard filled with bunch of Gadgets.
[caption id="attachment_1007" align="aligncenter" width="753" caption="Dashboard"]
The dashboard provides you the information related to runtime governance as well as design-time governance as described in the 'Dashboard' user guide.
6. Eventing and Notifications
If you want you to notified when a resource is updated or a lifecycle state of a service is changed, this feature will be really helpful. Look at the 'Eventing and Notifications' user guide on how you can get notified and the built-in events that you can listen.
7. Mount Remote Resources - Federating Registries
If you are maintaining two separate registry instances, this feature will enable you to share resources among them. In G-Reg you can create links to resources in remote registries (remote-links) as well as to the resources in the same registry (sym-links). Here is the user guide for 'Sym Links and Remote Links' to read more details of the subject.
8. User Profiles
The new G-Reg has the ability to keep multiple user profiles per user. A simple how to on creating profiles can be found in the user guide on 'User Profiles'.
9. Checkin/Checkout with Local Filesystem
The new G-Reg is shipped with a command line tool that allows you to checkin and checkout registry resources with your local filesystem. If you are familiar with a version control system like subversion, the checkin/checkout commands will not be much difficult to you.
Checking out a resource is simple as (the following command is what you typed in linux, in windows you will use the checkin-client.bat instead).
./checkin-client.sh co / -u user -p user_pw
And to checkin,
./checkin-client.sh ci -u user -p user_pw
Similarly you can use this tool to create backups or move resource or resource hierarchy off-line. Here is a complete user guide on 'Checkin-Client'.
10. Performance Boost
Last but not least, the new G-Reg is performing very fast than its predecessor. In the performance test, it was seen each primitive operation in the registry is at least 10% faster in this release, where as some operations are performing much faster (for an example, 'Add Collection' operation seemed 50% faster). And the remote registry calls also optimized by keeping a local cache (http-level-caching).
This was a list of most notable new features in addition to the bunch of the features that was already there in the previous releases. You will be able to download WSO2 Governance Registry freely from the product website, http://wso2.org/projects/governance-registry and evaulate these features as you want.
Labels:
3.0.0,
G-Reg,
Governace,
Governance,
Governance Registry,
New Features,
registry,
SOA,
WSO2
Saturday, July 11, 2009
WSO2 Carbon 2 - WSAS, ESB & Governance Registry Released
WSO2 -An open source middleware company- announced the release of bunch of their SOA enabling products along with Carbon 2.0.0 which is an OSGI based unified platform that all the WSO2 java products are built on.
You will be able to get the advantage of the carbon platform by extending the functionality of any of these products, just by mixing components from other products (Just like running an ESB within WSAS).
Download, Play around with them and Enjoy:)!!!
- WSAS (Web Service Application Server) - Provide and consume web services, data services with full WS-*, REST support, GUI tools, Integration with Eclipse, etc..
- ESB (Enterprise Service Bus) - Message routing, mediation, transformation, logging, task scheduling, load balancing, failover routing, event brokering, etc. with number of transports support
- Governance Registry - Govern you SOA platform, introducing number of new features including Dashboard with Gadgets, lifecycle management with checklists, eventing and notifications, remote/symbolic links, checkin/checkout functionality and new meta data management UI.
You will be able to get the advantage of the carbon platform by extending the functionality of any of these products, just by mixing components from other products (Just like running an ESB within WSAS).
Download, Play around with them and Enjoy:)!!!
Labels:
carbon,
data services,
DataServices,
esb,
Governance,
governance registry,
registry,
release,
SOA,
web services,
wsas,
WSO2
Sunday, July 05, 2009
JDBC Transactions And Deadlocks
Programming with Database is very challenging. It is all about you designed and normalized the database really correctly without missing any important indexing and writing the most optimized queries. In addition to that database programmer should be aware of whether the order of the queries in an execution flow will make a deadlock specially in very complex systems.
There are many guidelines that you can follow specially on avoiding (probably minimizing) deadlocks. Specially the guide "Reducing SQL Server Deadlocks" provides a checklist to reduce deadlocks in a database program.
There are many guidelines that you can follow specially on avoiding (probably minimizing) deadlocks. Specially the guide "Reducing SQL Server Deadlocks" provides a checklist to reduce deadlocks in a database program.
Tuesday, June 23, 2009
Apache Stonehenge Releases First Milestone
Apache Stonehenge, A project to demonstrate the interoperability between heterogeneous platforms has done their first milestone release few days back.
The first milestone demonstrate the interoperability between
Each of these technologies has implemented a Stock trader application with Business Service, Order Processor and Trader Client components. You will be able to assemble the application by mixing components from any of the above implementations.
It provides you a great sample on using basic web services features (SOAP, WSDL etc..) and WS-Security across the above platforms.
If you are interested, you can download the sources and binaries from here, http://www.apache.org/dist/incubator/stonehenge/. Installation guides and other documentations can be found from here, http://cwiki.apache.org/STONEHENGE/
The first milestone demonstrate the interoperability between
- .NET - Microsoft WCF implementation
- Java - WSO2 Web Service Application Server (WSAS) implementation
- PHP - WSO2 Web Service Framework for PHP (WSF/PHP) implementation
Each of these technologies has implemented a Stock trader application with Business Service, Order Processor and Trader Client components. You will be able to assemble the application by mixing components from any of the above implementations.
It provides you a great sample on using basic web services features (SOAP, WSDL etc..) and WS-Security across the above platforms.
If you are interested, you can download the sources and binaries from here, http://www.apache.org/dist/incubator/stonehenge/. Installation guides and other documentations can be found from here, http://cwiki.apache.org/STONEHENGE/
Saturday, July 19, 2008
Moving to dimuthu.org
This is not the first time I moved away from blogspot. But this time it is to a more permanent place. Yea it is to my own place with my own domain name.
Just check my new web site and the blog http://www.dimuthu.org
It sill just a blog, but hope to make it more than that in future as time permits. Hope you will be in touch with me.
Just check my new web site and the blog http://www.dimuthu.org
It sill just a blog, but hope to make it more than that in future as time permits. Hope you will be in touch with me.
Wednesday, May 21, 2008
Tutorial on Axis2/C codegen (WSDL2C) tool
Finally I managed to write a simple step by step tutorial on how to use WSDL2C tool in Axis2/C. Visit it here, http://wso2.org/library/3534.
Saturday, March 22, 2008
Axis2/C Architecture
I found a discussion on Axis2/C user list about the references where you can find information on Axis2 Architecture and Damitha in the axis2/c list have posted list of great resources. Looks like the mail achieves think it is a junk message due to the bunch of links, So I thought it is better I can publish the list here, hopefully this will be useful for future users..
Flows, Phases, Handlers and modules <http://wso2.org/library/777>
Introducing Apache Aixs2/C <http://wso2.org/library/252>
Apache Axis2/C - Web services engine <http://wso2.org/library/2406>
Web Services Endpoints with Apache Axis2/C <http://wso2.org/library/2663>
WS-Addressing in Action <http://wso2.org/library/2605>
Sine Axis2/C and Axis2/java are based on same architecture these could
also be helpful to read
How Apache Axis2 Finds the Operation and Service a Message is Destined
To <http://wso2.org/library/176>
Web services and Axis2 architecture
<http://www-128.ibm.com/developerworks/webservices/library/ws-apacheaxis2/ >
Flows, Phases, Handlers and modules <http://wso2.org/library/777>
Introducing Apache Aixs2/C <http://wso2.org/library/252>
Apache Axis2/C - Web services engine <http://wso2.org/library/2406>
Web Services Endpoints with Apache Axis2/C <http://wso2.org/library/2663>
WS-Addressing in Action <http://wso2.org/library/2605>
Sine Axis2/C and Axis2/java are based on same architecture these could
also be helpful to read
How Apache Axis2 Finds the Operation and Service a Message is Destined
To <http://wso2.org/library/176>
Web services and Axis2 architecture
<http://www-128.ibm.com/develop
Sunday, February 03, 2008
Be aware of Terrorists
Yesterday (in Sri Lanka) there was a bomb blast in a bus, followed by two today one in Zoo, one in Colombo railway station targeting civilians. There are no any argument that only LTTE terrorists can do these kind of ruthless attacks.
No matter whoever do this, as responsible citizens we have to think what we can do to prevent or at least minimize this. Just ignore the country, at least to save our selves we should be able to do something.
From these and the past incidents it is obvious that terrorisst mostly target public places and public transport. Well I personally very rarely visit public place. But I always travels in public transport. I have to travel a long distance at weekends to visit my home and back, and short distance to go to my office and back to boarding place.
From these two kind, I mostly concern about my long distance travel since yesterday and some reason attacks were done on long distance buses specially when traveling in early morning. I and my Friend Omega who also ride long distance at every weekend had a little discussion yesterday on this subject. According to him, ( I also agree with him) there is a high probability that somebody can put a bomb bag in an early morning bus, because
1. Almost all the ppl sleep in the buses traveling in the morning (the ones who not standing), so no one notices if anything strange happens..
2. There are a lot of ppl traveling in the morning so the buses get crowded.
What we can do is simply ask bus conductor to check the bags of whoever want to come in. But this is not happening, It will delay the ride, and course people angry (NOTE, There are percentage of people who are really angry showing their bags for no reason) . Anyway we can ask conductor to do that just for our safeness. So we can at least make sure that there will be no blasting inside the bus.
Not only Government, But also normal ppl like us should do our maximum to halt terrorists acts and bring the peace to our country.
No matter whoever do this, as responsible citizens we have to think what we can do to prevent or at least minimize this. Just ignore the country, at least to save our selves we should be able to do something.
From these and the past incidents it is obvious that terrorisst mostly target public places and public transport. Well I personally very rarely visit public place. But I always travels in public transport. I have to travel a long distance at weekends to visit my home and back, and short distance to go to my office and back to boarding place.
From these two kind, I mostly concern about my long distance travel since yesterday and some reason attacks were done on long distance buses specially when traveling in early morning. I and my Friend Omega who also ride long distance at every weekend had a little discussion yesterday on this subject. According to him, ( I also agree with him) there is a high probability that somebody can put a bomb bag in an early morning bus, because
1. Almost all the ppl sleep in the buses traveling in the morning (the ones who not standing), so no one notices if anything strange happens..
2. There are a lot of ppl traveling in the morning so the buses get crowded.
What we can do is simply ask bus conductor to check the bags of whoever want to come in. But this is not happening, It will delay the ride, and course people angry (NOTE, There are percentage of people who are really angry showing their bags for no reason) . Anyway we can ask conductor to do that just for our safeness. So we can at least make sure that there will be no blasting inside the bus.
Not only Government, But also normal ppl like us should do our maximum to halt terrorists acts and bring the peace to our country.
Saturday, February 02, 2008
Shameless publications of a dying Terrorist Group
Sri Lanka is about to win the war against LTTE terrorists. Meanwhile these terrorists are trying to do all sort of things to show that they are still alive.
Hm. But the Internet seems a very difficult place to cheat.:)
Extracted from feedbacks on tamilnet.tv.
1. Here is a tiger terrorists publication last Wednesday, they claims it is a photo of Sri Lanka Government soldier. And they named that is the body of N.Kumara, a local name.
Funny thing is same photo have been published 18 months ago here. It is a body of a soldier in Iraq.
2. Here in tamilweek web site the image is named as it is an air crafts of LTTE. But here the same picture posted in the India Air Force web site.
They spend six years cheating World (But not Sri Lankan, I mean people who are living in Sri Lanka) with the Cease fire agreement. The cheat will not last long..
Hm. But the Internet seems a very difficult place to cheat.:)
Extracted from feedbacks on tamilnet.tv.
1. Here is a tiger terrorists publication last Wednesday, they claims it is a photo of Sri Lanka Government soldier. And they named that is the body of N.Kumara, a local name.
Funny thing is same photo have been published 18 months ago here. It is a body of a soldier in Iraq.
2. Here in tamilweek web site the image is named as it is an air crafts of LTTE. But here the same picture posted in the India Air Force web site.
They spend six years cheating World (But not Sri Lankan, I mean people who are living in Sri Lanka) with the Cease fire agreement. The cheat will not last long..
Tuesday, January 29, 2008
Amazon Online Shopping with Web Service Framework for PHP
I finally managed to submit my first article for WSO2 Oxygen Tank. It is about how to do online shopping with Amazon Web Services using Web Service Framework for PHP.
There I'm demonstrating how to write a simple client library to access Amazon Web Services and how to use that library to write your own application to do online shopping with Amazon.com
There I attached the Client library code and two sample applications, one very simple php command line application and the other much improved web application. Hope this will be useful to people who are interested in working with WSF/PHP.
There I'm demonstrating how to write a simple client library to access Amazon Web Services and how to use that library to write your own application to do online shopping with Amazon.com
There I attached the Client library code and two sample applications, one very simple php command line application and the other much improved web application. Hope this will be useful to people who are interested in working with WSF/PHP.
Monday, January 28, 2008
Select you service operation parameters..
In Web Service Framework for PHP 1.2, when you are writing a service using WSService with a WSDL, you always had to specify the type of the operation parameters to be "MIXED". But it would have been more convenient that the 'MIXED' to be default for ther service operation parameters when WSDL is specified.
So yesterday I took some minitues and change the logic so that,
1. When the WSDL is specified, the opParms would be default to "MIXED"
2. Otherwise, the opParams would be default to 'WSMESSAGE'.
So wsdl-mode code will be simplified to this..
So yesterday I took some minitues and change the logic so that,
1. When the WSDL is specified, the opParms would be default to "MIXED"
2. Otherwise, the opParams would be default to 'WSMESSAGE'.
So wsdl-mode code will be simplified to this..
function QueryPurchaseOrderFunction($pro_name, $quantity, $date, $orderNo) {
// the business logic.
}
$operations = array("QueryPurchaseOrder" => "QueryPurchaseOrderFunction");
// The following line is not required
// $opParms = array("QueryPurchaseOrderFunction" => "MIXED")
$svr = new WSService(array("wsdl"=>"sample_wsdl_11.wsdl",
//opParams" => $opParams; // This too not required
"operations" => $operations));
Labels:
PHP,
Web Service Framework for PHP,
Webservices,
WSDL,
WSService
Wednesday, January 23, 2008
Where to set your options?.. in WSClient or in WSMessage?
If you are familiar with WSF/PHP web service API, you may find that you can set your options in different level. For an example in order to set the endpoint you can either use the WSClient constructor like this,
or you can use the WSMesasge constructor
It may seems quite unnecessary to have duplicate methods to set something like "endpoint". But there are cases this is really helpful in your application.
If you ever tried calling two web service operations from one WSClient object, you may have already found the importance of having this way.
In such a case you can set the common options in the WSClient and operation specific options in the WSMessage.
Most probably you will use the same WSClient to invoke different operation in a service. There your service endpoint is the same for all the operation. So you can set the service endpoint and additionally some other common configurations like the soap version in the WSClient constructor.
So I think it is clear the flexibility provided by the duplicate methods of doing the same thing. It make your code more organized and most importantly more efficient.
new WSClient("to" => "endpoint",
"other_options" => .. );
or you can use the WSMesasge constructor
new WSMessage("to" => "endpoint",
"other_options" => .. );
It may seems quite unnecessary to have duplicate methods to set something like "endpoint". But there are cases this is really helpful in your application.
If you ever tried calling two web service operations from one WSClient object, you may have already found the importance of having this way.
In such a case you can set the common options in the WSClient and operation specific options in the WSMessage.
Most probably you will use the same WSClient to invoke different operation in a service. There your service endpoint is the same for all the operation. So you can set the service endpoint and additionally some other common configurations like the soap version in the WSClient constructor.
new WSClient("to" => "common_endpoint",After that you can concentrate on message specific options. One would be "action" which is different from message to message. In addition to that common case, say you have some set of operations which need authentication and others don't need. For that you have to use user-name tokens for that particular set of operations. What you can do is setting that security policy and the security token only to that request messages.
"useSOAP" => 1.1 );
$client->request(new WSMessage( $payload,
array("action" => "http://me.org/authenticating_operation",
"securityToken" => $securityToken,
"policy" => $policy)));
So I think it is clear the flexibility provided by the duplicate methods of doing the same thing. It make your code more organized and most importantly more efficient.
Labels:
Web Service Framework for PHP,
WSClient,
WSF/PHP,
WSMessage
Tuesday, January 22, 2008
PHP Web Services with fopen ..
If you have done little bit of 'C' (at least up to the lesson 'File Handling'), you may have come up with the function 'fopen'.
In PHP you can use 'fopen' not only to open a file in your hard disk, but also to open resource over network, specially from the Internet. Simply you can emulate http, https or ftp client functionality with the fopen.
That is simply you may cheat your friends by writing a your own version of Google like this.
You may find out that fopen is just a http client (and load only what it asks to load), it doesn't load images, since they need some additional http request which is automatically done if you instead did this request from a browser.
I think it is clear what 'fopen' can do. Why not we use it to access 'REST' web services. Yea, it is possible. To access 'REST' web services you only need is a Http client and as I mentioned 'fopen' is a Http client.
Let me show you how to access some real web service with fopen. I take amazon web service for an example.
Is that only what fopen can do?. Hm! do you believe that we can do simple 'SOAP' webservices with fopen?. If you have seen lot of 'SOAP' messages, that will not be a problem to write a simple SOAP request with 'fopen'.
That is you can have a good control of your HTTP Request associating a stream context with 'fopen'. A simple SOAP request may only need few http headers and request XML wrapped with 'soap' headers as 'POST' data.
you can create a simple stream context with php standard function 'stream_context_create'.
Here is how you may use the 'fopen' with stream_context_create to do a POST http request.
So if i use 'fopen' to do a SOAP request to call the same amazon web service, it will be like this..
In PHP you can use 'fopen' not only to open a file in your hard disk, but also to open resource over network, specially from the Internet. Simply you can emulate http, https or ftp client functionality with the fopen.
That is simply you may cheat your friends by writing a your own version of Google like this.
<h1>My Google</h1>
<?php
$fp = fopen("http://www.google.com", "r");
$google_html = fpassthru($fp);
echo $google_html;
?>
You may find out that fopen is just a http client (and load only what it asks to load), it doesn't load images, since they need some additional http request which is automatically done if you instead did this request from a browser.
I think it is clear what 'fopen' can do. Why not we use it to access 'REST' web services. Yea, it is possible. To access 'REST' web services you only need is a Http client and as I mentioned 'fopen' is a Http client.
Let me show you how to access some real web service with fopen. I take amazon web service for an example.
<?php... It is really simple.
$query = "TEST";
$catagory = "Books";
/* Use your own amazon key,
You can get it from http://aws.amazon.com */
$amazon_key = "your_amazon_key";
$fp = fopen("http://webservices.amazon.com/onca/xml?".
"SubscriptionId={$amazon_key}&".
"Service=AWSECommerceService&".
"Operation=ItemSearch&".
"Keywords={$query}&".
"SearchIndex={$catagory}&", "r");
$res = fpassthru($fp);
// For now I m just echoing the output as it is
echo $res;
?>
Is that only what fopen can do?. Hm! do you believe that we can do simple 'SOAP' webservices with fopen?. If you have seen lot of 'SOAP' messages, that will not be a problem to write a simple SOAP request with 'fopen'.
That is you can have a good control of your HTTP Request associating a stream context with 'fopen'. A simple SOAP request may only need few http headers and request XML wrapped with 'soap' headers as 'POST' data.
you can create a simple stream context with php standard function 'stream_context_create'.
Here is how you may use the 'fopen' with stream_context_create to do a POST http request.
<?php
$data = "Here is my POST data";
$opts = array(
'http'=>array(
'method'=>"POST",
'header'=>"User-Agent: My Own Http Client\r\n".
"Content-length: " . strlen($data)."\r\n",
'content' => $data
)
);
$context = stream_context_create($opts);
$fp = fopen($url, 'r', false, $context);
/* you got the pointer to $fp, use any function like fgets, freed to read the buffer */
?>
So if i use 'fopen' to do a SOAP request to call the same amazon web service, it will be like this..
<?php
$query = "TEST";
$catagory = "Books";
/* Use your own amazon key,
You can get it from http://aws.amazon.com */
$amazon_key = "your_amazon_key";
$soap_msg = <<<XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<ItemSearch xmlns="http://webservices.amazon.com/AWSECommerceService/2007-10-29">
<SubscriptionId>${amazon_key}</SubscriptionId>
<Request>
<Keywords>{$query}</Keywords>
<SearchIndex>${catagory}</SearchIndex>
</Request>
</ItemSearch>
</soapenv:Body></soapenv:Envelope>
XML;
$opts = array(
'http'=>array(
'method'=>"POST",
'header'=>"User-Agent: fopen soap engine\r\n".
"Content-Type: text/xml;charset=UTF-8\r\n".
"SOAPAction: \"http://soap.amazon.com\"\r\n".
"Content-length: " . strlen($soap_msg)."\r\n",
'content' => $soap_msg
)
);
$context = stream_context_create($opts);
$fp = fopen("http://soap.amazon.com:80/onca/soap?Service=AWSECommerceService", 'r', false, $context);
$result = fpassthru($fp);
echo $resutl;
fclose($fp);
?>
Subscribe to:
Posts (Atom)
