Monday, October 15, 2007

Building WSF/PHP From source

WSF/PHP is an extension for PHP that provide WS* web Services support for PHP. It is build on top of WSF/C Framework. Since there was number of questions on the forum on how to build WSF/C from source on Win32 Platfrom I thought of writing the steps down.

First you need to download the dependency libraries needed. Here is a list of them.

1. Libxml2 (http://www.zlatkovic.com/pub/libxml/)

2. Iconv (http://www.zlatkovic.com/pub/libxml/)

3. zlib (http://www.zlatkovic.com/pub/libxml/)

4. PHP source and binary ( www.php.net )

5. PHP build utilities (http://www.php.net/extra/win32build.zip)

6. WSO2-WSF/PHP extension source. (http://dist.wso2.org/products/wsf/php/wso2-wsf-php-src-1.1.0.zip)

Now you are ready to build WSO2 WSF/PHP extension from source.

Unzip the wso2-wsf-php-src-1.1.0.zip file to your prefered location. I use E:\wso2-wsf-php-src-1.1.0 as an example. In this folder you will find a configure.in file which is used to specify the configuration parameters to build WSF/PHP.

In the configure.in file you will find entries for specifing the locations of the
WSF/PHP dependencies. Here is the configure.in file shiped with WSF/PHP.

###################################
### General Build Configuration Parameters

# To build with debug symbols set DEBUG = 1
DEBUG = 1

###################################
### Apache Axis2/C Build Configuration Parameters

# Path to libxml2 installation
LIBXML2_BIN_DIR = E:\libxml2-2.6.27.win32

# Path to iconv installation
ICONV_BIN_DIR = E:\iconv-1.9.2.win32

# Path to zlib installation
ZLIB_BIN_DIR=E:\zlib-1.2.3.win32

# Path to Apache2 installation
APACHE_BIN_DIR = "E:\Apache22"
# Apache httpd version, to use apache 2.0.x set APACHE_VERSION_2_0_X = 1
APACHE_VERSION_2_0_X = 0

# Enable/disable LibCurl client transport, to enable set ENABLE_LIBCURL = 1
ENABLE_LIBCURL = 0
# Path to LibCurl installation, required if LibCurl transport is enabled
#LIBCURL_BIN_DIR = E:\libcurl-7.15.1-msvc-win32-ssl-0.9.8a-zlib-1.2.3

# Enable/disable SSL client transport, to enable set ENABLE_SSL = 1
ENABLE_SSL = 1
# Path to OpenSSL installation, required if SSL transport is enabled
#OPENSSL_BIN_DIR = D:\OpenSSL

# Enable/disable Guththila parser, to enable set ENABLE_GUTHTHILA = 1
ENABLE_GUTHTHILA = 0


############################
### Apache Rampart/C Build Configuration Parameters

# Path to OpenSSL installation
OPENSSL_BIN_DIR = E:\OpenSSL


############################
### Apache Sandesha2/C Build Configuration Parameters

# Build with SQLite support for permanent storage, to disable set WITH_SQLITE = 0
WITH_SQLITE = 1
# Path to SQLite installation
SQLITE_BIN_DIR = "E:\sqlite-source-3_3_8"
# Path to SQLite source
SQLITE_SRC_DIR = "E:\sqlite-source-3_3_8"

# Build with MySQL support for permanent storage, to enable set WITH_MYSQL = 1
WITH_MYSQL = 0
# Path to MySQL installation
MYSQL_BIN_DIR = "C:\Program Files\MySQL\MySQL Server 5.0"

############################
# Configuration for building wsf/php extension using its own build
PHP_SRC_DIR = E:\php\php-5.2.4
PHP_BIN_DIR = E:\php\php-5.2.4-Win32
WIN32BUILD_DIR = E:\php\win32buil

As you can see , specifing the Dependencies is very simple.
Next step is to run the build.bat file located in the wso2-wsf-php-src-1.1.0 directory. It will build the binary distribution to a folder named wso2-wsf-php-bin-1.1.0-win32 directory.

Thats it.

Thursday, August 2, 2007

WSO2 WSF/PHP v1.0.0 Released

After almost one year of development, We are finally releasing the 1.0.0 version of WSO2 WSF/PHP.
WSO2 1.0.0 version has following features.

1. Client API to consume Web Services.
* WSMessage class to handle message levell 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. Attachment support [ MTOM / Base64 ]
* Binary Optiomized
* Non-Optimized (Base64 binary)

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 Generation for Server Side
* WSDL generation based on annotations and function signatures, and
serving on ?wsdl requests

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

9. WSDL mode support for both client and server side
* Write services and client based on a given WSDL

10. Backward compatibility with PHP5 SOAP extension
* Experimental


You can download the realse from
http://dist.wso2.org/products/wsf/php/1.0.0/

Project home page:
http://wso2.org/projects/wsf/php

Thursday, July 26, 2007

WSO2 Web Services Framework (WSF)/PHP v1.0.0beta Released

WSO2 Released the WSF/PHP v 1.0.0beta last week. It is quite an improvement over the alpha2 release done in may.

The new Addtions inclue the implementation of dynamic client api and improvements to the build system and security api implementations.

The full feature list is as follows.

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

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

7. WSDL Generation for Server Side
* WSDL generation based on annotations and function signatures, and serving on ?wsdl requests

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

9. WSDL mode support for both client and server side
* Write services and client based on a given WSDL

The Project home page
http://wso2.org/projects/wsf/php

You can download the release from: http://dist.wso2.org/products/wsf/php/1.0.0beta/

First Blog Entry

Hello World