Answering users questions about wsf/php installation for many months, I thought it is worth to take some time and make a shortlist of some regular questions asked by them. Actually problems has been occurred not only due to users mistakes in following the installation steps properly, but also due to the status of the systems like already installed old versions, use of different package management tools, mulitple installations of same thing like php/apache and conflicts in libraries. In this little FAQ i’m trying to answer problems users come up with due to all of above mentioned reasons. And feel free to correct me or even add here some entries through comments.

  1. Where is the installation guide?If you have downloaded the packs (either source or binaries), you can find the installation README in their. README.INSTALL for the linux installation and README.INSTALL_WIN32 for the windows installation.

    You can find the online version from http://wso2.org/project/wsf/php/1.3.2/docs/install_guide.html

  2. I have lot of php.ini files in my system. Which should I edit? (Refers to http://wso2.org/forum/thread/3879)This is because you have many PHP installations in your system, one from deb, one from compiling source another can be from Zend core. Similarly there can be many apache instances as well.

    The best way to find the php.ini is to use the php function phpinfo(). For that you have to find the apache web root directory. By default it is ‘/var/www’. If it is not /var/www just find for the directory named htdocs and it can be most probably your web root directory.

    Create a php file (say phpinfo.php) with the following lines of code.

    <?php
    phpinfo()
    ?>

    And save the file inside your root web directory and access it though the browser. (most probably it is http://localhost/phpinfo.php)

    And search for the entry “Loaded Configuration File”. That is exactly what you were finding for..

  3. My Web Services Client correctly working on the Command line (using PHP CLI). But the same thing doesn’t work when I put it in the apache server in the same computer and access from a browser. It complains with the error message ‘WSClient’ not found, What can be the problem?The php.ini loaded by the CLI can be different from the one loaded by the server. Just find the correct php.ini loaded by the server. So the answer to this question is same as the answer to the above question.
  4. My Web Service Client run on the apache server correctly, but doesn’t run on the command line?
    There also you need to find the php.ini loaded from the PHP CLI. run the php -i command and check what is the loaded configuration.
  5. I’m in windows. I have followed all the steps correctly. But php error log always says wsf.dll is not loaded. What may I have missed here?
    The first thing you should do is check the PATH variable value from a phpinfo (not from command line), I have mentioned the steps to create phpinfo page in the answer to the question number 2. After that search the entry for PATH variable in the Apache environment section. Just check whether this is the same path that you think you have set. You get this problem mostly because the path loaded by apache is different from what you set. You may mistakenly have set the required library paths to the user environment variable and not to the system environment variable. Or you may have to restart the system to actually update these variable. Try these things until you actually get the PATH you want to have from the phpinfo.

    The other possibility is you have a set of old libraries prior to the new libraries in your PATH. This happens mostly if you are upgrading the system from old wsf/php version. If that so make sure you remove the paths of these old libraries from the PATH variable.

    And another possibility is the user mistake. Check your libxml, iconv and openssl libraries are actually in the PATH, if not just set it and try.

  6. All my samples are working except the samples in the wsdl_mode and wsdl_generation directories. Any clue?
    You may have missed either
    installing, enable php xsl extension
    or
    setting the include_path to the scripts directory. (This scripts directory is shipped with every binary and source packs, when you extract these packs the ’scripts’ directory will be there right in the root directory of the pack.

    The other very rare reason would be some compatibility issues on libxml2 version used by dom and the libxml2 version used by the xsl. Apparently if you have libxml2 version 2.6.31 with an older libxml2 version (like 2.6.2*) most probably you will find php crashes when using xsl and dom. See the link http://wso2.markmail.org/message/54yvh2pcowhrj332. This is like fight between dom and xsl for the libxml2 library, if the first one loaded the old version the other one will be down, since it is not compatible with that loaded version. in this situation you have to upgrade either the xsl extension or the dom extension (that mean you better upgrade all the php libraries and binaries)

  7. I installed apache and php using apt-get command in my ubuntu OS. but when I edit php.ini in the /etc/php5/apache2 directory the configuration are not loaded correctly. What should I do?
    This problem can be aroused in any debian based system when you install apache and php from apt-get or with deb. In this case you have to create a file like wsf.ini inside /etc/php5/apache2/conf.d directory and add the wsf specific configuration there.
    extension=wsf.so
    include_path=.:/my/script/directory/script
    Remember there you have to install php-xsl package from apt-get or using a deb.
  8. When I run samples It simply doesn’t work. And there are no complains in the php error log or apache error log, and in phpinfo it shows the wsf is correctly loaded. How can I solve this?
    If the wsf is loaded and still the samples fails, the next thing you should do is check out the wsf logs from where you specify to generate in the php.ini (if you didn’t specify it in linux it will be default to /tmp directory). Open the wsf_php_client.log and find the errors and entries in the later part that may have caused the problem. If it say something like client repo doesn’t exists or axis2.xml is failed to load just double check the wsf.home you specified in the php.ini
    If you don’t understand whatever the wsf log tell, please put a question in the forum http://wso2.org/forum/188 or put a mail http://wso2.org/mail#WSFPHP with both wsf_php_client.log and wsf_php_service.log attached. (Make sure you delete any sensitive data in the blog)
  9. Samples says it is working successfully. How can I make sure the clients/services actually sends messages?
    Download tcpmon from http://ws.apache.org/commons/tcpmon/download.cgi. You can send the messages through tcpmon and track their content. Just read the tcpmon tutorial and try to get it working.

WSO2 WSF/Ruby is back in a release, after more than 6 months. We released the WSF/Ruby 1.0.0 in this January (with the start of the year work) with a number of features that someone may expect in a WS-* stack. For Ruby space there were no such thing support that many number of WS-* specs, specially implementation for WS-Security, WS-SecurityPoilcy, MTOM were really new for ruby developers.

For this release (1.1.0), we mainly worked for improving the usability aspects of the WSF/Ruby. The result is the WSDL mode for both client and the server, and more importantly with this you can specify WS-Addressing and WS-SecurityPolicy assertions through a WSDL.

Here is the complete release note. Hope you ruby people try this out, enjoy and more importantly give us some valuable feedback..

WSO2 Web Services Framework For Ruby (WSF/Ruby) - 1.1.0 Released
=============================================

WSO2 WSF/Ruby team is pleased to announce the release of WSO2 WSF/Ruby 1.1.0.

WSF/Ruby is the Ruby language extension to WSO2 WSF/C. This enables you to consume/provide Web Services both with REST and with the power of WS-* stack including WS-Reliable Messaging, WS-Security, WS-Addressing and MTOM Attachments.

For more information, please visit our project home page, http://wso2.org/projects/wsf/ruby

You can download this release from: http://wso2.org/downloads/wsf/ruby

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

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

3. Attachments with MTOM

* Binary optimized
* Non-optimized (Base64 encoded)

4. WS-Addressing

* Version 1.0
* Submission

5. WS-Security
* UsernameToken and Timestamp
* Encryption
* Signing
* WS-SecurityPolicy based configuration

6. WS-Reliable Messaging
* Single channel two way reliable messaging

7. WSDL mode support for both client and server side
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode

8. REST Support
* Expose a single service script both as SOAP and REST service

Major Changes Since Last Release
================================
o WSDL mode support for both client and server side
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode

Dependencies
============
1. The provider implementation uses Rails framework as the deployment model. Therefore in order to use provider implementation, you should have Rails installed on your machine. Please visit http://www.rubyonrails.org/ to find out more about RoR(Ruby on Rails).

Reporting Problems
==================
Issues can be reported using the public JIRA available at: https://wso2.org/jira/browse/WSFRUBY

Contact Us
==========
Please subscribe to our user or developer mailing lists. For details on how to subscribe please visit: http://wso2.org/mail#wsfruby

Thank you for your interest in WSO2 WSF/Ruby.

- WSO2 WSF/Ruby Team

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”