Blog from WSO2 WSAS Developers

Sunday, August 24, 2008

If you are really interested in JAVA web services and like to know its applications in enterprise level Here a great NEWS. Developers of WSO2 Web Services Application Server (WSO2 WSAS) have started a Blog WSO2 WSAS Blog to keep you update about the WSAS project and NEWS generally on SOA, Web Services, WS-* Stack. You will surely find this place really useful in addition to the resource you can find in WSO2 Projects Community Portal - Oxygen Tank.

Howto Build Custom SOAP Headers in WSDL Using Axis2/C and WSF/PHP

Thursday, August 21, 2008

WSF/PHP latest trunk has the support for sending and serving custom headers in the WSDL Mode. Read this blog about Howto Build Custom SOAP Headers in WSDL Using Axis2/C and WSF/PHP for more details about the API and how you would declare custom headers in a WSDL.

Next WSF/PHP Release is Almost Ready

Tuesday, August 19, 2008

We are almost done. Today, I had a look into the issue tracker, and there are only about four issues pending. That is covering lots of ground.

We should have the next WSF/PHP pack released by mid of next month.

Send Binary in SOAP with WSF/PHP 1.3.2

There are different methods you can send binaries in a SOAP message. The blog "Send Binary in SOAP with WSF/PHP 1.3.2" describes these methods in general and how you can implement each of these approach in WSF/PHP 1.3.2

Short note for Web Services Security API in WSF/PHP 1.3.2

Sunday, August 17, 2008

I wrote a little short note on how you can use WS-Security with WSF/PHP 1.3.2 in here.

REST Frameworks for PHP

Zend Framework has client and server classes for REST. WSO2 WSF/PHP too has comprehensive support for REST, both client and services.

If your requirements are simple and you are just starting to use REST services, Zend Framework would be a good choice to start with. But if you are going form design to implementation and your application is of enterprise grade, then you have to consider WSO2 WSF/PHP. WSF/PHP is designed in such a manner that you can map your resource design, along with HTTP verb mapping and custom URI mapping to business operations with minimal effort.

PHP Data Services - Integration to next level

Saturday, August 16, 2008

Related to my yesterday's post on integration, have a look at this post, to get an understanding on getting data as Web services to really work in the real world

The right way to Integrate

Friday, August 15, 2008

Do you integrate you PHP application with other applications out there? Is your portal running with PHP and you leverage other third party applications to make your PHP application rich? And what are the technologies you use there?

Web services has been used for some time now to solve integration problems, and PHP can use the same technologies. Most application, including Software as a Service (SaS) applications provide Web services APIs, both SOAP and REST. And WSF/PHP form WSO2 provide a very strong set of APIs for this.

WSO2 itself has an array of PHP based Web applications. The corporate Web site, developer portal web site as well as an array of other applications that are internal but are integrated to the .com and .org site used an array of PHP applications. And they leverage Web services, and WSF/PHP when it comes to integrate across the various applications. As an example we talks to Jira based support system using Web services API and integrate that to Drupal based developer sites user accounts.

So, not only that WSO2 develop these great products and contribute those to the community, but WSO2 itself use them in production. You can too...

Encrypt and Sign your SOAP messages in PHP

Thursday, August 14, 2008

I wrote a blog about How to Encrypt and Sign your SOAP Messages in PHP. You can find out the two basic choices you have in securing soap messages + some links on how to develop them.

Make your Wordpress Blog a Web Service in Few Steps

Sunday, August 10, 2008

I wrote a simple guide in here about how to create a Web Service from a Wordpress blog using WSO2 PHP DataServices library.
It doesn't matter what you have is Drupal, Wordpress or Joomla, You can still follow this guide and understand the concept and use of the DataService Library. Without doubt it will assist you to create a web serivce from your existing database strcture without much effort.

Installing wsf/php in a third party hosting environment

Wednesday, August 6, 2008

If you have a third party hosting environment and you want to use wsf/php extension, you have to set to deploy the PHP as cgi-based and not through traditional mod_php. That way you will be able to use custom php.ini and configure wsf/php installation. Make sure to check whether your hosting service have capability to deploy cgi-based php and any documentation for that. For an example dreamhost provides following documentation for that.

There may be some hosting environments (Here I mean hosting services deployed php in linux based systems) that you are not have permission to read root directories. So in such cases you have to set the extension_dir entry in the php.ini relative to the cgi-bin directory in your document root. But wsf/php 1.3.2 and lower versions having a problem of not loading wsf.home directory when you are using WSClient class. But it works well for WSService by default.

You can solve this problem by putting the following code right before you use WSClient.

$script_dir = dirname($_SERVER['PHP_SELF']);
$htdocs_dir = '.'.preg_replace('/[^\\/']+/, '..', $script_dir);
$cgibin_dir = $htdocs_dir.'/cgi-bin';


For an example if you put the above code to the echo client in sample directory it would be like,

$requestPayloadString = <<<XML
<ns1:echoString xmlns:ns1=><text>Hello World!</text></ns1:echoString>


try {

$script_dir = dirname($_SERVER[
$htdocs_dir =
".".preg_replace("/[^\\/"]+/, "..", $script_dir);
$cgibin_dir = $htdocs_dir.


$client = new WSClient(array( to =>
"" ));

$responseMessage = $client->request( $requestPayloadString );

printf(Response =
"%s <br>", htmlspecialchars($responseMessage->str));

} catch (Exception $e) {

if ($e instanceof WSFault) {

printf(Soap Fault:
"%s\\n", $e->Reason);
} else {
printf(Message = "%s\\n


Nested Queries with PHP Data Services

Monday, August 4, 2008

If you have been aware of PHP Data Services, You may be already know that it is going to be a major feature in the WSF/PHP 2.0.0 release. In fact you can download it from here and run it with WSF/PHP older versions as well.

I wrote a little guide/ tutorial on how to do nested queries with PHP Data Services over here. Hope this will be usefull for people who were looking for some documentation on how to use this library in addition to the samples and the online demos.