Formerly I have written several guidelines to install wsf/php in Linux like Installing WSF/PHP 1.2.1 in ubuntu and Install WSF/PHP 1.2.1 with zend core in Ubuntu 7.10. So I thought to prepare a similar guideline for windows specially with my favorite wamp software wampserver.

  1. Download wampserver from http://www.wampserver.com. and install. The installation can be done completely using the GUI installer and it is straightforward. I install it in the default directory, C:\wamp. My wampserver version is 2.0, but i think this guide should work for most of the versions near 2.0 as well.
  2. Download wso2 wsf/php windows binary from http://wso2.org/projects/wsf/php. It is 1.3.2 when I’m writing this.
  3. Extracted the binary in to a local directory. I extract the wso2-wsf-php-bin-1.3.2-win32.zip to the C:\software directory where I normally put my software.
  4. Download the iconv and libxml2 windows libraries from http://www.zlatkovic.com/pub/libxml/
  5. Extract them in a local directory. I m extracting it to my C:\software directory

    Note: So after the above steps I have following directories. So if you follow this correctly you should also have a similar directory structure.

    C:\wamp

    C:\software\wso2-wsf-php-bin-1.3.2-win32

    C:\software\libxml2-2.6.30.win32

    C:\software\iconv-1.9.2.win32

  6. Copy the wsf.dll file to the wamp php extension directory. So if you follow the same path I used to install the software you can copy the “C:\software\wso2-wsf-php-bin-1.3.2-win32\wsf.dll” to “C:\wamp\bin\php\php5.2.6\ext” directory straightaway. Adjust your paths according to your installation directories.
  7. Now you have to find the php.ini to set the configuration of wsf/php. If you are running wamp you can find the wampserver icon in the left hand side of the task bar.

    click the wampserver icon -> go to PHP menu -> click php.ini and the php.ini will be opend.

    Add the following entries to the end of the file. (The path should be changed to your installation directory locations)

    [wsf]
    wsf.home=”C:\software\wso2-wsf-php-bin-1.3.2-win32\wsf_c”
    wsf.log_path=”C:\software\wso2-wsf-php-bin-1.3.2-win32\wsf_c\logs”
    wsf.log_level=3

    extension=wsf.dll

    include_path=”.;C:\software\wso2-wsf-php-bin-1.3.2-win32\scripts”

  8. Enable the xsl extension. This can also be done using the wamp server icon in the left hand side of the task bar

    Wampserver icon -> PHP -> PHP Extensions -> php_xsl (you may have to scroll down to find the entry and make sure it is ticked)

  9. Then you should add the libxml2, iconv and wsf/c libraries to the ‘PATH’ environment variable. This can be done using the windows GUI.

    Right click My Computer -> click Properties -> Go to the ‘Advanced’ tab -> click ‘Environment Variables’

    There you can see the list of user variables and system variables. In the ’system variables’ there should be an entry for the ‘path’ variable. If it exist select that entry and click the edit button, if not click the new butto and add the variable name ‘path’ Note that you should not add the paths in to user variables since Wamp will never load user variables at the statup.

    I added the following directories to the path variable separating them with semi colons. Again the locations can be changed depend on where you installed wsf/php.

    C:\software\libxml2-2.6.30.win32\bin

    C:\software\iconv-1.9.2.win32\bin

    C:\software\wso2-wsf-php-bin-1.3.2-win32\wsf_c\lib

    So for me the dialog box the path variable looks like this,

    Variable name: Path

    Variable value: <some early libraries for other binaries>…..;C:\software\wso2-wsf-php-bin-1.3.2-win32\wsf_c\lib;C:\software\libxml2-2.6.30.win32\bin;C:\software\iconv-1.9.2.win32\bin

    Unfortunately to be loaded ’system variable’ by wamp, you have to restart the system. So just do a restart.

  10. Next time you start the wampserver you should see the wsf extension ticked in the GUI. Now copy the wsf/c sample directory to the www directory. In my computer it is copying ‘C:\software\wso2-wsf-php-bin-1.3.2-win32\samples’ to ‘C:\wamp\www’.

    Try some samples in “http://localhost/samples” from browser. And you just installed wsf/php in WAMPServer..

Today I got to install wso2 wsf/perl in my Ubuntu 8.04 OS. It was really straight forward.  Just follow the following steps and you are ready to do real web services in perl.

  1. Download wsf/perl 1.1 from cpan web site. http://search.cpan.org/CPAN/authors/id/C/CH/CHINTANA/WSO2-WSF-Perl-1.1.tar.gz
  2. Download wsf/c 1.3.0 from the oxygen tank. http://dist.wso2.org/products/wsf/c/1.3.0/wso2-wsf-c-src-1.3.0.tar.gz
  3. First extract the wsf/c packtar xvzf wso2-wsf-c-src-1.3.0.tar.gz
  4. Compile and install the wsf/c to a preferred directory (say /tmp/wsfc)../configure –prefix=’/tmp/wsfc’makemake install (you may need super user privileges depending on where you select to install the package)
  5. Install the following packages from apt respositories.perl, libperl-dev, liberror-perlYou can use the following command to install themsudo apt-get install perlsudo apt-get install libperl-dev

    sudo apt-get install liberror-perl

  6. Now extract the WSO2-WSF-Perl-1.1.tar.gztar xvzf WSO2-WSF-Perl-1.1.tar.gz
  7. Set the WSFC_HOME environment variable to where you install wsf/c. (in our example it is /tmp/wsfc)export WSFC_HOME=/tmp/wsfc (Remember you have to do this every time you open a new shell, or else put this line in the ~/.bashrc file)
  8. Inside the WSO2-WSF-Perl-1.1 directory runperl Makefile.PLNote: This may sometime complains about missiling libraries (actually for -laxis2_minizip, -laxis2_libxml2, -lhtpwcb). Anyway this will not be a problem for your installation.
  9. Now the last step of your installation.makesudo make install (Here you need to have super user priviledges)
  10. Just go to the samples directory and run the echo_client.pl (You need to have a wsf/php server running to response these wsf/perl calls). Make sure it gives the expexted output.

Currently WSF/Perl have only the web services client libraries. But it is rich with features like WS-Security, WS-Reliable Messaging, MTOM and many more.

July 19th, 2008Welcome to dimuthu.org

I have been blogging in wordpress http://dimuthuc.wordpress.com and blogspot http://dimuthuc.blogspot.com for sometime now. And I have been blogging a lot around my working area from http://phpwebservices.blogspot.com.

Still I m not a regular blogger. And I dont think having my own blog with my own domain name will do any different ;). But it s always worth do a try.  Now I can install my favorite software and favorite plug-ins, themes and customize them to the full extend. Lacking of these features were the main reason I moved here and there before this. So I hope I will do more blogging in here.

So what will I blog? I have had some hits  for my blogs on Axis2/C, WSDL2C codegen tool, WSF/PHP and web services areas. And definitely I will continue blogging more and more on that space. And I should update the blog with the interesting things I learn from the work and studies that worth to share with everyone.

Hope to see you through many blogs!