Steps to Convert a SQL Query to a Data Service

Thursday, November 27, 2008

With WSF/PHP Data Service library, you can convert a SQL query to a Data Service very easily in few steps. Here are the steps, described in "Steps to Convert a SQL Query to a Data Service"

5 Facts About WS-Addressing Action in WSF/PHP

Wednesday, November 26, 2008

WS-Addressing Action is used by web services to dispatch the operation for an incoming request SOAP message. This blog "5 Facts About WS-Addressing Action" present you some facts about WSF/PHP API for WS-Addressing.

The Use of SOAP Action with WSF/PHP

Tuesday, November 25, 2008

The SOAP action is mainly used for dispatching of web service operations. This post about "The Use of SOAP Action with WSF/PHP" talks about how SOAP action is presented in a message and how it can be used to write web services and consumers with WSF/PHP.

Data Services - Databases For SOA

Sunday, November 23, 2008

With the adoption of SOA, the more data services are built around existing databases allowing applications to access the data easily as either REST or SOAP with all the WS-* features.. This post about "Data Services - Databases For SOA" talks about the need of data services and tools to implement them.

WS-SecurityPolicy With PHP

Wednesday, November 19, 2008

WS-SecurityPolicy specification defines standards for defining security policies for your web service. This post about "WS-SecurityPolicy With PHP" discusses the approaches you can take in order to associate security policies in to your PHP web service.

Signing SOAP Headers In PHP Web Services

Tuesday, November 18, 2008

Signing meta data of SOAP headers, can be as important as signing the SOAP body which contain the actual data in your business. This post "Signing SOAP Headers In PHP Web Services" talk about how your PHP web service providers and consumers can sign SOAP headers.

Detect Replay Attacks In to Your PHP Web Service

Monday, November 17, 2008

Intruders can make nasty damages to your web services just by using Replay Attacks. So you have to design your services carefully to detect and avoid them. This post "Detect Replay Attacks In to Your PHP Web Service" discusses the possible solutions on detecting replay attacks with PHP web services.

How to contribute to WSF/PHP project

Sunday, November 16, 2008

As an open source software development project, WSF/PHP always encourage users,developers to raise bugs, and post patches etc. Of course if you have any great idea related to WSF/PHP or some enhancement to WSF/PHP, you are most welcome to contribute.

Lets see how you can contribute to WSF/PHP project in various ways. If you encounter a bug, you can first check on the svn to see whether it is already fixed as well.

1. How do I provide a patch to WSF/PHP .


WSF/PHP uses svn as its version control system. You can checkout the source code of WSF/PHP from the following URL.

On windows you can use Tortoise SVN to checkout the source code as follows.

Step 1.

Create a folder to which you will checkout the source code.

Step2. Check out the code


















Now you can make any changes or additions, you would like to make.

Step 3.

Use create patch option in Tortoise svn to create a patch.














This should provide you with a patch file.

Step 4.

Go to WSO2 Jira project and select WSF/PHP project



 jira2  Select WSF/PHP project                                            












Go to create new issue options and select WSO2 WSF/PHP from projects drop down menu. Then select the issue type










Now in this issue form, you can fill out information about the issue.












Next fill out the issue description, your testing environment, and attach the patch.












Now click create button to create the issue.

This way you can contribute to WSF/PHP project which is used by a large number of PHP Developers worldwide. Looking forward to your contributions.

RESTful URL Mapping in WSF/PHP

In a RESTful design, choose of URLs for web resources are really important. This post about RESTful URL Mapping in WSF/PHP, talks about how you can choose URLs for your resources in a RESTFul manner and How it can be implemented in PHP.

XML Schema Simple Types & How WSDL2PHP Convert Them To PHP

Thursday, November 13, 2008

There are many categorizations of simple types in xml schema. The applications of each of these categories are different from one to other. And the representation of them in PHP are too different. This blog title "XML Schema Simple Types & How WSDL2PHP Convert Them To PHP" explains all about these details.

WSF/PHP Test Cases Explained

Tuesday, November 11, 2008

WSF/PHP comes with a comprehensive set of test cases. It covers the most of the basic/concrete scenarios supported by WSF/PHP. This post titled "WSF/PHP Test Cases Explained" gives you an overview of this test-suite and the scenarios they are covering.

Introduction to reliable messaging part 3

Monday, November 10, 2008

In this blog post, we will look at how you can send multiple application messages within a single sequence reliably using

WSClient API.  For this purpose WSClient has an option named willContinueSequence. If you intend to send only a since application message within your reliable sequence, then you do not need to touch this option. However, when sending multiple application messages, you need to use it as follows.

1. When sending the first message, set willContinueSequence=TRUE in WSClient.

2. Send your application messages by using WSMessage object.

3. When you want to send the final application message to be sent within the reliable sequence, set the option lastMessage to true.

Here is a code example demonstrating this.

Step 1. First create an application message.

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

Step 2. Create a WSClient object with willContinueSequence option set to TRUE

$client = new WSClient(array( "reliable" => TRUE, "useWSA" => TRUE, "willContinueSequence" => TRUE));

Step 3. Create and Send WSMessage objects containing application messages.

$message = new WSMessage($requestPayloadString,
           array( "to" => "http://localhost/samples/reliable/ping_service_rm.php",
                  "action" =>;


$message1 = new WSMessage($requestPayloadString,
            array( "to" => "http://localhost/samples/reliable/ping_service_rm.php",
                   "action" => ""));


Step 4. When you want to send the last application message, set the option lastMessage to true in WSMessage object.

$message2 = new WSMessage($requestPayloadString,
    array( "to" => "http://localhost/samples/reliable/ping_service_rm.php",
           "action" => "",
           "lastMessage" => TRUE));


Note that this is a ping service and hence the use of the method send in WSClient. You can similarly use request method as well.

Sending Custom SOAP Headers in PHP Web Services

Monday, November 3, 2008

There are 2 basic ways of building custom soap headers in your PHP Web Service Client, I.e. With and without WSDL. Check this blog post for more details on how to do follow each of these approach..

Introduction to reliable messaging part 2

In my previous blog post, we had a look at a set of messages exchanged between a web services client and a server using WS-Reliable Messaging protocol.  Today, we will explore the API available in WSF/PHP to achieve reliable messaging.

WS-Reliable messaging API in WSF/PHP is a simple an uncomplicated one. Lets go thorough each of the options available on WS-Client to achieve reliable messaging.

To enable WS-Reliable Messaging you need to use the "reliable" option in WS-Client. However, for WS-RM to work, it is mandatory to have WS-Addressing enabled. There for you need to  enable WS-Addressing or at least define the "action" option in WS-Client. If the action is present, and "reliable" options is set to "true", WSF/PHP will automatically enables WS-Addressing and enables Reliable Messaging. So following options are valid on WS-Client to enable reliable messaging.


oparray["action"] = "";

oparray["reliable"]= TRUE;

client = new WSClient(oparray);


oparray["action"] =""


In this option, we are telling WS-Client to use WS-RM version 1.1.

In my next blog post, we will explore other configuration options of WSClient and WS-Service