WSO2 Web Services Framework for PHP v1.3.1 Released

Thursday, May 29, 2008

We did a bug fix release of WSF/PHP 1.3.0 as 1.3.1. This release is essentially the same with a couple of bug fixes. One bug was in WS-Security in WSDL mode. Other issue was an attachment handling issue. Here is the complete release note.

 

WSO2 Web Services Framework for PHP v1.3.1 Released
=====================================================

We are pleased to announce the release of WSO2 WSF/PHP 1.3.1.

WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source,
enterprise grade, PHP extension for providing and consuming Web Services
in PHP. WSO2 WSF/PHP is a complete solution for building and deploying
Web services and is the only PHP extension with the widest range of
WS-* specification implementations.

It's Key features include, secure services and clients with WS-Security
support, binary attachments with MTOM, automatic WSDL generation (code
first model), WSDL mode for both services and clients (contract first
model) and interoperability with .NET and J2EE.

You can download the release from:
http://wso2.org/downloads/wsf/php

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

------------
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
* 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

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

8. WSDL mode support for both client and server side
* Write services and client based on a given WSDL
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode

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

10. Provide easy to use classes for common services
* Consume some well known services such as Yahoo search and Flickr
and Amazon services using predefined classes

11. wsdl2php.php script. This script can generate PHP classes for
services and clients for a given WSDL to be used with WSDL Mode .

--------------------------------
Major Changes Since Last Release
================================
* Bug fixes related to MTOM, Security

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

------------
Contact Us
============

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

We welcome your early feedback on this implementation.
Thank you for your interest in WSO2 WSF/PHP.

-- WSO2 WSF/PHP Team --

wsdl2php and php2wsdl are now online

Monday, May 26, 2008

If you have just heard wsdl2php tool and ?wsdl (wsdl generation) features in wsf/php, now you have a chance to check how they work, online at http://labs.wso2.org/wsf/php (Note the right side box)

In wsdl2php tool you can input the wsdl location url and generate the relevant php code (server side or client side as your preference).

In php2wsdl tool you are given text box to input your wsf/php service code. If you are not familiar of coding with wsf/php, you can start with an example (there are 6 difference samples), and edit them as your requirement.

Hope you will find this really useful.

WSO2 Web Services Framework for PHP v1.3.0 Released

Thursday, May 22, 2008

Finally we have 1.3.0 Released. It took a little time (around 1 month preparation), but it is well tested and richer feature wise. For more information, just have a look at the release note,

WSO2 Web Services Framework for PHP v1.3.0 Released
=====================================================

We are pleased to announce the release of WSO2 WSF/PHP 1.3.0.

WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source,
enterprise grade, PHP extension for providing and consuming Web Services
in PHP. WSO2 WSF/PHP is a complete solution for building and deploying
Web services and is the only PHP extension with the widest range of
WS-* specification implementations.

It's Key features include, secure services and clients with WS-Security
support, binary attachments with MTOM, automatic WSDL generation (code
first model), WSDL mode for both services and clients (contract first
model) and interoperability with .NET and J2EE.

You can download the release from:
http://wso2.org/downloads/wsf/php

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

------------
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
* 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

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

8. WSDL mode support for both client and server side
* Write services and client based on a given WSDL
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode

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

10. Provide easy to use classes for common services
* Consume some well known services such as Yahoo search and Flickr
and Amazon services using predefined classes

11. wsdl2php.php script. This script can generate PHP classes for
services and clients for a given WSDL to be used with WSDL Mode .

--------------------------------
Major Changes Since Last Release
================================
1. Schema constructs support improvements for WSDL mode including
SimpleType restricitons, ComplexType restrictions/extensions and
attributes.
2. WSDL Import support.
3. Support for WSDLs with multiple bindings, API is provided to pick
the preferred bindings.
4. wsdl2php code generation improvements to support the improvements
done in WSDL mode.
5. HTTP Basic Authentication Support added.
6. SOAP Messages with Attachments support (SWA) added.
7. Custom Security token support added.

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

------------
Contact Us
============

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

We welcome your early feedback on this implementation.
Thank you for your interest in WSO2 WSF/PHP.

-- WSO2 WSF/PHP Team --

How to get the service's X509 certificate?

Wednesday, May 14, 2008

Many PHP developers who are trying to write a secure PHP client using WSF/PHP, find it a bit difficult to understand "How to obtain the certificate of the service". The service certificate is required to encrypt the content and/or verify the service's signature. The X509 certificate used by the service can be hosted somewhere by the service writer, so that it can be easily downloaded. But in some cases it is not. We are supposed to extract it. This will tell you how to do that.

Cutting down number of linux binaries

Tuesday, May 6, 2008

The development team agreed on cutting down the number of linux binaries after analyzing the number of downloads on those packages. So for 1.3.0 release we are going to ship only following packs
- source tar and zip
- pecl tar
- Windows bin.

So as you see we are not providing debs or rpms.

Anyway if many users are requesting a binary for a particular platform we will be able to provide that.

"opParams" option for WSService

The option "opParams" is an optional parameter to the WSService. If you set opParams to WSMESSAGE the service function would be like this,

/* this is the service function */
function echoFunction($inMessage /* with the type of WSMessage */) {

$outMessage = new WSMessage($inMessage->str);


return $outMessage; /* with the type of WSMessage */
}

$operations = array("echoString" => "echoFunction");


$opParams = array("echoFunction" => "WSMESSAGE");
/* WSMESSAGE is the default value for this situation */

$service = new WSService(array(


"opParams" => $opParams,

"operations" => $operations))

Note that when you provide WSMESSAGE to the "opParams", the service operation parameters(both input and output) are of the type WSMessage.
Now say we put "MIXED" in there like the one in following
/* this is the service function */
function echoFunction($inMessage /* with the type of string */) {

$outMessage = $inMessage;

return $outMessage; /* with the type of String */
}

$operations = array("echoString" => "echoFunction");


$opParams = array("echoFunction" => "MIXED");
/* MIXED is the default value for this situation */

$service = new WSService(array(

"wsdl" => "http://localhost/echostring.wsdl",
"opParams" => $opParams,

"operations" => $operations))

Here note the difference in the service operation. Now the argument types are strings. This types are defined in the wsdl which is provided as an argument to the WSService.

So it is clear

When "wsdl" is provided the opParams are default to "MIXED",
otherwise it is default to "WSMESSAGE".

So you don't need to provide the opParams option explicitly in both above cases.

Next WSF/PHP 1.3.0

In last blog I kept you waiting for the WSF/PHP 1.2.2. release. But looks like we have done lot of feature addition than just bug fixes. So it is time to go for 1.3.0

Here are the list of features introduced in this release.

1. Schema constructs support improvements for WSDL mode including
SimpleType restricitons, ComplexType restrictions/extensions and attributes.
2. WSDL Import support.
3. Support for WSDLs with multiple bindings, API is provided to pick
the preferred bindings.
4. wsdl2php code generation improvements to support the improvements done in
WSDL mode.
5. HTTP Basic Authentication Support added.
6. SOAP Messages with Attachments support (SWA) added.
7. Custom Security token support added.

The release packs are almost done, and will be ready to ship on next Monday after doing all the testings.