Flickr online Application

Saturday, April 26, 2008

Here you can visit a nice online PHP Flickr application written using the Flickr SOAP API in fact using the WSF/PHP as the back end.

WSF/PHP 1.2.2 & wsdl2php

Thursday, April 24, 2008

The enhancements done to wsdl2php tool to support as much schema constructs as possible is the key highlight of the upcoming WSO2 WSF/PHP 1.2.2 release.

One of the key limitations of the built in SOAP extension is the level of schema support. I have seen many users complaining on this on the PHP SOAP list.

The amount of schema coverage that you get with WSF/PHP also beats out NuSOAP WSDL support. We have done considerable amount of testing for a large number of WSDL files with various schema constructs for WSF/PHP.

I expect the wsdl2php tool be the killer tool that help solve all the problems that PHP users faced with WSDL.

WSF/PHP 1.2.2 is ready to ship

Monday, April 21, 2008

If you were looking forward to use WSDL mode with PHP here is a good NEWS for you. WSF/PHP 1.2.2 is coming up with the support of many WSDL and XML Schema constructs.
Here is a list of WSDL and Schema Constructs it is going to support,
  • Elements with simpleType
  • simpleType restriction
  • simpleType list
  • complexType sequence
  • complexType all/choice
  • inner content models
  • complexContent extension (non xsi:type based serializing, parsing)
  • complexContent restriction
  • attribute
  • simpleContent extension
  • attributeGroup
  • WSDL import
In addition to the above we still have the following features to implement, and these are planned to implement in the next major release 1.3.0
  • anyAttribute
  • custom headers
  • xsi:type" based serialization and parsing
  • Mtom support with WSDL mode

We would be able to do the release early next week. Hope you will enjoy the new feature set.

WSF/PHP : Creating Business-Conscious IT Solutions

Friday, April 18, 2008

See how to here...

WSF/PHP with doc-lit bare WSDLs

Wednesday, April 16, 2008

You may use doc-lit bare WSDL to send a web service request with just one simple parameter in the message, like this.

In order to prepare this message with wsdl mode in WSF/PHP you can directly input the parameter value without instantiate any wrapper classes. Just take look at the following doc-lit bare WSDL and the corresponding WSDL-mode client to have an idea how easy it is.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl=""


xmlns:soap="" targetNamespace="">

<xs:schema xmlns:tns=""
elementFormDefault="qualified" targetNamespace="">

<xs:element name="echoInt" type="xs:int"/>
<xs:element name="echoIntResponse" type="xs:int"/>

<wsdl:message name="echoIntRequest">
<wsdl:part name="parameters" element="ns0:echoInt"/>

<wsdl:message name="echoIntResponse">
<wsdl:part name="parameters" element="ns0:echoIntResponse"/>

<wsdl:portType name="EchoServicePortType">
<wsdl:operation name="echoInt">

<wsdl:input message="ns0:echoIntRequest" wsaw:Action="urn:echoInt"/>
<wsdl:output message="ns0:echoIntResponse" wsaw:Action="urn:echoIntResponse"/>

<wsdl:binding name="EchoServiceSOAP12Binding" type="ns0:EchoServicePortType">

<soap12:binding transport="" style="document"/>
<wsdl:operation name="echoInt">

<soap12:operation soapAction="urn:echoInt" style="document"/>
<soap12:body use="literal"/>

<soap12:body use="literal"/>

<wsdl:service name="EchoService">
<wsdl:port name="EchoServiceSOAP12port_http" binding="ns0:EchoServiceSOAP12Binding">

<soap:address location="http://localhost:8080/dyn/codegen/demo/services/EchoService"/>

And the client is simple as this

// the background work for create wsclient and the proxy
$client = new WSClient(array ("wsdl" =>"echo.wsdl"));

$proxy = $client->getProxy();

// you directly input the request parameter
$response = $proxy->echoInt(3);

echo $response;

So in a case where you just need to send only one parameter for the service operation, this form of messages make your web service call more efficient and more easy to implement.

PHP Web Services With IIS

Tuesday, April 1, 2008

It is possible for you do deploy PHP Web Services using WSF/PHP in IIS. Following the steps to install WSF/PHP in IIS.

1. Configure PHP With IIS.

You can find a complete guide to installing PHP with IIS from php documentation.

2. Configure WSF/PHP with PHP

Configuring WSF/PHP with PHP is quite easy. But you have to follow few additional steps to get it working on IIS.

i. Extract wsf/php binary can copy wsf.dll to your php extensions directory.

ii. Set following php.ini settings.

extension_dir=E:\php5\ext    { Here my E:\php5 is the location where I have extracted the php binary. Note that I have not used any quotes in the php. If you have paths, It will not work properly.

wsf.home=<path to php binary extract directory>\wsf_c\lib

wsf.log_path=<path to php binary extract directory>\wsf_c\logs

wsf.rm_db_dir=<path to php binary extract directory>\wsf_c\


iii) add wsf php dependencies and <wsf-php-bin>\wsf_c\lib directory to path System variable

3. Copy the samples, start IIS

Copy the samples directory to C:\Inetpub\webroot directory.

Start IIS with the following command

net start w3svc

Now use the <?php phpinfo(); ?> script to check whether wsf extension is load properly. You can simply copy and paste the above script to a file and put it in to C:\inetpub\webroot directory and try it. If the wsf extension is show in the page then all is fine. If it is not there check whether you have added the dependencies ( Libxml2, iconv) and <wsf-php-bin>\wsf_c\lib directory to the path system variable properly. Sometimes you may need to restart the machine to get these changes to the path to work properly.

Once you have the wsf extension loaded, you can run the samples.