Online Tools for PHP Web Services Developers

Sunday, September 28, 2008

You can find an overview of the tools hosted in the PHP Demo Site in this post.

REST Framework for PHP

Saturday, September 27, 2008

I have been blogging about WSF/PHP 2.0 being a comprehensive REST framework. Now it is available for you to download.

If you want to design services from scratch, WSF/PHP would be a very good choice, because it provides a natural mapping form design to implementation.

Also, given the fact that this is an extension written in C, it would also provide you with better performance, compared to other REST frameworks purely written in PHP.

RESTful CRUD Data Services Demo

Here is a live demo on RESTful Data Services implemented with WSF/PHP. I wrote a blog about this Demo explaining how you give semantic to the Http Verbs to manipulate (Do CRUD operations on) Resources in RESTful way.

Http Authentication for SOPA Messages in PHP - 2 Minutes Introduction

Thursday, September 25, 2008

Yesterday I wrote about authenticating users using Username token which is a more SOA friendly way of doing authentication. Because it is handled in Message level and clearly defined in WS-Security Specification.

But if you want to do Http Basic Authentication you can still use WSF/PHP as your client. Here is a blog How you send Basic Authentication information with your SOAP message in PHP. Note that here authentication is handled in trasport layer. So this approach is only valid if you are using HTTP transport which is the most common transport to use in web services.

Authenticate using Username Token from PHP - 2 Minutes Introduction

Tuesday, September 23, 2008

Username token is the most simple scenario described in WS-Security specification. It is used to authenticate users from their SOAP request messages.

The blog "Authenticate using Username Token from PHP - 2 Minutes Introduction" give you quick tutorial how you can implement this in PHP using WSF/PHP.

Webinar - Introducing Enterprise Web services with WSO2 WSF/PHP 2.0.0

Monday, September 22, 2008

WSO2 WSF/C product stack lead Selvaratnam Uthaiyashankar is doing a *FREE* Webinar on “Introducing Enterprise Web services with WSO2 WSF/PHP 2.0.0” at 11.00 AM (US Mountain Time) on 23rd September 2008.

You can register from this link. Note that you don't need any registration fees.

Send Binary With Web Services in PHP - 2 Minutes Introduction

If you want to send binary in web services, you have several options. You can use either base64 encoded strings or MTOM, SWA binary optimized protocols. Here is a very quick introduction on how you can implement it in your application.

WSDL2PHP 2 Minutes Introduction

In .Net, Java or C before you developing a web service consumer or a provider you have tools to generate a skeleton code from the WSDL. So you only to concentrate on your business logic as all the WSDL related work is handled by this generated code.

WSDL2PHP is the tool to do the same in PHP. Have a look at this tutorial to learn how to use it in your application.

SOA Way of Writing PHP

Thousands of web developers around the world use PHP to develop their web applications. As SOA emerges, the enterprise world is moving towards web services more than just web applications. But PHP is slow to used in implementing SOA. This blog titled 'SOA Way of Writing PHP' is study of why you should use SOA in your enterprise application and how to implement it in real world.

Integrating PHP CMS systems with other applications

Friday, September 19, 2008

Here are some interesting thoughts on how to integrate PHP CMS system with other enterprise applications.

Video - WSF/PHP in Enterprise Applications

Thursday, September 18, 2008

Shankar who is the manager of the WSF Framework projects including WSF/PHP, explaining the Real world use of the WSF/PHP specially in the enterprise space.

Do REST in PHP - PHP RESTful Data Services

Can you do PHP Data Serivces in REST style with WSF/PHP 2.0.0. Yes certainly you can do it.

Check out this demo about 'RESTful School' and see how can map unique urls to each piece of data you have.

Check "Do REST in PHP - PHP RESTful Data Services" for a guideline of the demo.

Simplest Approach to Enterprise Grade Web Services

Are you bored with spending lots of time and money writing web services? Are you bored dealing with complex API's provided by Java and .Net based web services platforms? These are the things that we worry every day when we want to bring our software solutions to the outside world as standard services.

Now we are moving to a new era of Web Services with WSF/PHP as a platform for developing enterprise grade web services with the minimal effort from the programmer. Now lets look at what are tools required to build a enterprise solution using Web Services.

Obviously the first requirement is the ability to create and consume web services. WSF/PHP has this capability in the simplest form possible. You can read more about how to create and consume web services in the online documentation of WSF/PHP. This includes the creating services from WSDL and creating services manually. Also for the client side you have the option of building the client manually as well as using the WSDL.

But creating and consuming web services is only a small part of your overall solution. At the beginning you may think that "who cares about security". But when your application grows I can guarantee you will feel the need for security. But there is nothing to worry as WSF/PHP can cater for all your web services security requirements. As the service writer you don't have to worry about the details of complex WS-Security mechanisms underneath. That is the best part of the story.

If you want more than the delivery guarantees of TCP protocol and want the message level reliability, WSF/PHP can use the WS-ReliableMessaging delivery guarantees.

Also WSF/PHP comes with a nice way to convert all your data to web services very easily. Now you don't have to write services manually to expose your existing data to the world. WSF/PHP Data services can do this for you in very few easy steps.

WSF/PHP comes with two very distinctive features that you won't find in any other web services platform. Enterprise readiness and ease of use are these two distinctive features. So if you want to develop enterprise grade web services with the minimal effort try WSF/PHP and feel the difference.  

Debugging PHP Web Services

I wrote a blog on some of the tips of how to debug web service client and services. It would be useful to you if you are getting started with WSF/PHP.

Installing WSF/PHP in windows

Tuesday, September 16, 2008

WSF/PHP is a new era for web services with its ease of use and all the cool features. To unveil this new world of web services you need to get started in some way. I have chosen the hard way and decided to build it from the scratch. I have blogged about my first experience with WSF/PHP. In this I have explained how to build and configure WSF/PHP under windows.

PHP Data Services With WS-Security

When it come to a PHP application with WS-Security, you should be using WSF/PHP somewhere. Similarly with the new Data Services library WSF/PHP become the only option to host Data Services with WS-Security.

Read my blog post on Data Services with WS-Security where I used an online DEMO application to demonstrate the use of WS-Security in Data Services.

Implementing REST Client and Services Using WSF/PHP

Monday, September 15, 2008

WSF/PHP 2.0.0 supports implementing REST Services and clients using HTTP Methods POST,GET,DELET, and PUT. It addition, it allows custom URL mappings for service operations.

You can find more details on implementing REST client and Services using WSF/PHP here.

Code First Approach of Developing Services with WSF/PHP 2.0

WSF/PHP comes with many new features + feature enhancements including improvments for WSDL Generation. WSDL Generation is a core module of the WSF/PHP which allows developers to use 'Code First Approach' to develop web services.

I have blogged about existing features + new features avaialble in the WSF/PHP supporting the code first approach of developing services. If you prefer this approach you will find this post really helpful.

Only PHP Library for Creating Both SOAP and REST Services

WSO2, the open source SOA company, today announced the availability of the WSO2 Web Services Framework for PHP (WSF/PHP) 2.0. WSF/PHP is the industry's only PHP scripting language library that enables developers to create and consume both SOAP and REST Web services -- with the security and reliability required for an enterprise service-oriented architecture (SOA).

WSF/PHP 2.0 adds significantly expanded REST functionality, new Data Services, greater interoperability, and extended security. With WSF/PHP 2.0, developers now have a comprehensive framework for deploying PHP services that meet the strict enterprise SOA standards implemented by corporations and governments worldwide.

WSF/PHP 2.0 is part of the WSO2 family of Web Services Framework (WSF) products designed to support enterprises' heterogeneous SOAs. Other WSO2 WSF products include WSF/Ruby, WSF/Perl, WSF/Java, WSF/JavaScript, and WSF/Spring. With the WSF family, enterprises' diverse developer communities have the functionality they need to create Web services in their language of choice.

"WSO2 exists to enable heterogeneous SOAs, and WSF/PHP 2.0 is an important part of that mission. Through WSF/PHP 2.0, enterprises can tap an expansive community of PHP developers by giving them the first comprehensive framework for easily creating both SOAP and REST services," said Dr. Sanjiva Weerawarana, CEO of WSO2. "With our new Data Services and expanded interoperability, WSF/PHP 2.0 also provides a critical bridge between tens of thousands of PHP Web applications and the many enterprise data sources, applications and services driving today's enterprises."

WSF/PHP 2.0 Development, Interoperability and Security Enhancements

With full support for REST, SOAP, and WS-* specifications, WSF/PHP lets a single service be exposed both as a SOAP-style and as a REST-style service using a simple PHP-friendly programming model. WSF/PHP 1.0 provided a REST API along with support for SOAP 1.1 and 1.2, WSDL 1.1 and 2.0, and SOAP Message Transmission Optimization Mechanism (MTOM). WSF/PHP 2.0 adds a comprehensive REST framework featuring custom Uniform Resource Identifier (URI) mapping -- making it easy and intuitive to map a REST API into PHP when creating a Web service.

WSF/PHP 2.0 facilitates Web service creation for the large majority of PHP Web applications that rely on databases. The new WSF/PHP Data Services solution lets developers take data in LAMP(1), WAMP(2), and other PHP-based systems and expose it as a Web service with full WS-* support. Key features include a dbs2php converter tool, and support for multiple database engines, nested queries, and WSDL generation.

Extended interoperability in WSF/PHP 2.0 makes it easier for developers to seamlessly integrate PHP applications with those based on other enterprise platforms. WSF/PHP 2.0 offers much stronger support for the latest WS-* standards, as well as increased testing against Microsoft .NET, the WSO2 WSAS, Axis2/Java, and other J2EE implementations.

    WSF/PHP enterprise security and reliability includes the support
for WS-Security, WS-SecurityPolicy, and WS-ReliableMessaging available
with WSF/PHP 1.0. Version 2.0 of WSF/PHP adds capabilities in four

-- Replay detection tracks whether a message is fresh or has been
previously sent, preventing replay attacks that can lead to
denial of service.

-- WS-Trust for issuing, renewing, and validating security tokens
ensures trusted relationships.

-- WS-SecureConversation support allows a series of messages (a
conversation) to be protected by a single session key,
improving efficiency of the operation.

-- Support for the Public Key Cryptography Standards (PKCS) makes
it possible for services written in WSF/PHP to handle multiple
client x509 certificates simultaneously, further improving

Other development and performance enhancements in WSF/PHP 2.0 include:

    --  Increased WSDL support includes tools, such as wsdl2php for
contract-first development of services and clients; the
ability to generate WSDLs for WSF/PHP Web services scripts;
and proven support for a range of WSDL styles, including
support for advanced schemas such as extensions and

-- Policy-driven design provides users with a maximum level of
control by allowing developers to configure the behavior of
services using policies.

-- Binary data capability gives users a choice between sending
and receiving binary data as attachments using either MTOM or
a SOAP message with attachment (SwA). MTOM in version 2.0 has
been optimized through caching, enhancing performance.

-- Expanded deployment models for WSF/PHP 2.0 include several
platforms -- notably Linux, Windows, and Solaris -- as well as
seamless integration with Apache and Microsoft Internet
Information Services (IIS) Web servers.

-- Enhanced stability to ensure high availability and

Zend Core Support Featured at ZendCon

With version 2.0, WSF/PHP has been tested and proven to run with Zend Core, Zend's tested, certified and supported version of PHP, which has been widely adopted by enterprises for their production PHP environments. WSF/PHP 2.0 is being launched in conjunction with ZendCon 2008; the Zend/PHP conference runs September 15-18, at the Santa Clara Convention Center in Santa Clara, CA. WSO2 will demonstrate WSF/PHP 2.0 at the Microsoft ZendCon booth.

"Zend and WSO2 are mutually dedicated to serving the diverse needs of PHP developers with world-class open-source software for implementing Web services," said Andi Gutmans, CTO and co-founder at Zend Technologies. "By bringing support for both enterprise-oriented WS-* and REST Web services to our managed PHP production environment, WSO2 joins us in empowering the developers supporting more than 20 million PHP websites with unprecedented flexibility for delivering enterprise-class Web services."

WSF/PHP 2.0 Webinar

WSO2 will present a free webinar, "Introducing Enterprise Web Services with WSO2 WSF/PHP 2.0," which will review how to take advantage of the new REST functionality and WSF/PHP Data Services support. The webinar will run from 9:00-10:00 a.m. Pacific on Tuesday, September 23, 2008. Presenting the webinar will be Selvaratnam Uthaiyashankar, a WSO2 software architect and lead developer of the WSO2 Web Services Frameworks. For more information, visit:

Availability and Support

The WSO2 Web Services Framework for PHP 2.0 is available for download today. As a fully open source solution released under the Apache License 2.0, it does not carry any software licensing or subscription fees. WSO2 offers a range of service and support options for WSF/PHP 2.0. These include support subscriptions, training, consulting, custom development and development support. For information on service and support packages, visit

About WSO2

WSO2 is the open source SOA company founded by pioneers in Web services and the Apache Software Foundation Web services community. The company delivers the only tightly integrated, entirely open source middleware stack that is optimized for SOA. The WSO2 products address the core components of SOAs: service creation, connection, composition and governance. The company is backed by Intel Capital and maintains operations in the United States, United Kingdom and Sri Lanka. For more information, visit

(1)LAMP: open source Web platform consisting of Linux, Apache, MySQL, and PHP

(2)WAMP: Web server package containing Windows, Apache, MySQL, and PHP

Trademarks and registered trademarks are the properties of their respective owners.

Source: WSO2

WSO2 Web Services Framework for PHP v2.0.0 Released

Friday, September 12, 2008


WSO2 WSF/PHP version 2.0.0 was released today. It comes with a lot of new features. In addition to the that many bug fixes have been done since the previous release.

Following are some of the key features and changes for this release extracted from the release  note.

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
      * WS-Secure Conversation

6. WS-Reliable Messaging
      * Single channel one way and 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
      * MTOM is now supported with 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

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

12. Data Services API
    PHP Data Services API that enables exposing database queries as web services.


Major Changes Since Last Release
* Added PKCS12 Keystore Support
* Added Secure Conversation Support
* Added Replay Detection Support
* Contract First Web Services support for MTOM
* SWA ( Soap With Attachments ) Support added
* MTOM Attachment caching support added
* HTTP Chunking support added
* REST API Improved to support HTTP verbs GET,DELETE,PUT and POST
* New PHP Data Services Solution
* WS-RM 1.1 added
* Many Bug Fixes


As you can see, A lot of new features have been added since that last release. It is a feature complete and therefore we are calling it version 2.0.0.

We welcome you to try out this latest release of WSF/PHP.

Developing WSF/PHP Webservices With Contract First Approach - 2 Minutes Introduction

Monday, September 8, 2008

Are you finding a quick guide to develop a web service starting from a WSDL (contract first approach). Have a look at my blog on Developing WSF/PHP Webservices With Contract First Approach - 2 Minutes Introduction

PHP DataServices 2 Minutes Introduction

Saturday, September 6, 2008

Here is a very quick introduction to the DataServices and the PHP DataSerivces API, PHP DataServices 2 Minutes Introduction. PHP DataServices library will be released with the WSF/PHP 2.0 version within next couple of week. If you are really hurry to test this library, go and get it from the DataService demonstration page from PHP Web Services DEMO site.

WSF/PHP WSDL Generation 2 Minutes Introduction

Friday, September 5, 2008

If you want a quick look at how to generate a WSDL from a PHP Script Read my blog on WSF/PHP WSDL Generation 2 Minutes Introduction

WSF/PHP Articles and Tutorials

Monday, September 1, 2008

Here are some of the tutorials and articles written about WSF/PHP.