20
Enterprise Web Services With WSO2 WSF/PHP 2.0 Selvaratnam Uthaiyashankar [email protected] September 2008

WSF PHP 2 Webinar Sep 2008

  • Upload
    wso2

  • View
    5.233

  • Download
    0

Embed Size (px)

DESCRIPTION

wso2

Citation preview

Page 1: WSF PHP 2 Webinar Sep 2008

Enterprise Web Services With WSO2 WSF/PHP 2.0Selvaratnam [email protected]

September 2008

Page 2: WSF PHP 2 Webinar Sep 2008

WSO2 Background Founded in August 2005 by Leaders in XML and Web

services technologies & standards and open source Building complete SOA platform, all 100% open

source Founders/ leading contributors to all key Apache

Web Services/SOA Projects Provide commercial support, training and services

around the software & solutions Global corporation with R&D center in Sri Lanka

and offices in US & UK, totalling 60 + employees

Page 3: WSF PHP 2 Webinar Sep 2008

Content ManagementSystem

Financial System

CRM system

Social Networking System

What is the problem with the existing PHP Systems?

Page 4: WSF PHP 2 Webinar Sep 2008

What is the problem with the existing PHP SOAP support?

.NET

J2EE

JavaCICS

SAP

Secure, Reliable, Binary Web Services

PHPWebsite

SOAP 1.1No securityNo reliabilityNo WS-I BPNo MTOM BinaryNo WS-Addressing

Page 5: WSF PHP 2 Webinar Sep 2008

What is WSF/PHP? A library that allows users to Create and

Consume SOAP and REST Web Services in PHPWith full Secure Reliable Interop against

.NET, Java and JEESimple PHP-friendly programming model

$client = new WSClient(array("useMTOM" => TRUE, "useSOAP" => "1.2", "useWSA" => TRUE, "policy" => $wspolicy, "securityToken" => $sec_token));

Page 6: WSF PHP 2 Webinar Sep 2008

Comparison with other SOAP libraries

Package Written in WSDL Attachment Security Reliability

PHP5 SOAP Ext C Partial No No No

NuSOAP PHP Yes No No No

SCA with PHP(IBM) PHP Yes No No No

WSO2 WSF/PHP C Yes Yes Yes Yes

Page 7: WSF PHP 2 Webinar Sep 2008

WSF/PHP Features Stability Multiple Deployment Models

Linux Windows Solaris Apache IIS

Tested with Zend Core for stability and functionality

Page 8: WSF PHP 2 Webinar Sep 2008

Comprehensive Support for WS-* Standards WS-Addressing

•Version Submission, 1.0 WS-Security

•Version 1.0, 1.1

•Base security standards mean that messages can be protected using Encryption, Authentication and Signature

WS-Trust, WS-SecureConversation•Version 1.0, 1.3

•Advanced security standards allow single-sign on, more efficient encryption and more secure deployment

WS-Policy and WS-SecurityPolicy•Enables using industry standard XML to configure security

WS-ReliableMessaging 1.0, 1.1 and WS-RMPolicy•Enables reliability between PHP and other platforms including message resending, duplicate detection and persistence

WSF/PHP Features (Cont...)

Page 9: WSF PHP 2 Webinar Sep 2008

Support for Contract First And Code First approaches WSDL 1.1 and WSDL 2.0 SOAP 1.1 and SOAP 1.2 WSDL Generation support using annotated code. Wide coverage of complex schema constructs. WSDL2PHP Script to generate client and services for

given WSDL.

WSF/PHP Features (Cont...)

Page 10: WSF PHP 2 Webinar Sep 2008

Enterprise Level SecurityAuthenticationConfidentiality IntegrityNon-RepudiationReplay Detection

WSF/PHP Features (Cont...)

Page 11: WSF PHP 2 Webinar Sep 2008

Binary Data CapabilitySupport for Base64, SWA and MTOMSecure MTOM supportMTOM with reliable supportWSDL Mode API

Quick and easy API to handle binary with MTOM enabled WSDLs.

Caching Low Memory footprint for large binary attachments

WSF/PHP Features (Cont...)

Page 12: WSF PHP 2 Webinar Sep 2008

Comprehensive Support for REST Full REST support (GET, PUT, DELETE, POST) with custom URI

Mapping Enables mapping a REST API into PHP easily and naturally

function echoFunction($inMessage) {

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

$operations = array("echoString" => "echoFunction");$restmap = array ("echoString"=>array("HTTPMethod"=>"GET", "RESTLocation"=> "echoString"));

$service = new WSService(array("operations" => $operations, "RESTMapping"=>$restmap));$service->reply();

WSF/PHP Features (Cont...)

Page 13: WSF PHP 2 Webinar Sep 2008

PHP Data Services Multiple database engine support (with PHP PDO extension) Nested Query support Array based API dbs2php converter tool to convert WSAS Java data service XML

configurations to PHP code WSDL Generation support

$config = array("db" => "mysql", "username" => "root", "password" => "abc", "dbname" => "ds", "dbhost" => "localhost");

$inputFormat = array("employeeByNumber" => "INT");

$outputFormat = array("resultElement" => "employees", "rowElement" => "employee", "elements" => array("last-name" => "lastName", "first-name" => "firstName", "email" => "email"));

$sql = "SELECT lastName,firstName,email FROM Employees WHERE employeeNumber=?";

$operations = array("employeesByNumber" => array("inputFormat" => $inputFormat, "outputFormat" => $outputFormat, "sql" => $sql));

$my_data_service = new DataService(array("config" => $config, "operations" => $operations));$my_data_service->reply();

WSF/PHP Features (Cont...)

Page 14: WSF PHP 2 Webinar Sep 2008

InteroperabilityWith .Net and JavaMessagingBinary Data (MTOM)WS-AddressingWS-SecurityWS-Reliable Messaging

WSF/PHP Features (Cont...)

Page 15: WSF PHP 2 Webinar Sep 2008

WSF/PHP 2.0 improvements Improved Stability Interoperability Better WSDL support WS-SecureConversation support PKCS support Replay attack suppression Support for ratified WS-* specifications PHP Data Services support Improved REST API MTOM Caching

Page 16: WSF PHP 2 Webinar Sep 2008

Customer Examples Consuming SaaS from PHP Web applications

E.g. Betting, Gaming sites Governmental and Standards-based work

Integrating CMS systems (Drupal, Joomla) with SOA platforms Consuming existing third party services Exposing CMS functionality as services Portal integration with SOA back-ends

Service enabling PHP legacy applications Securing service oriented applications that require

end-to-end message level security

Page 17: WSF PHP 2 Webinar Sep 2008

The Traditional PHP Application

Page 18: WSF PHP 2 Webinar Sep 2008

SOA Solution With WSF/PHP

Page 19: WSF PHP 2 Webinar Sep 2008

Summary A major new release of a popular library

Adds improved WS-* and REST supportImproved stabilityMakes it simple to connect PHP to a wider SOANew capability to expose Data Services makes

creating services more effective than ever

Page 20: WSF PHP 2 Webinar Sep 2008

Oxygen Tank Articles PHP Web Services: Getting Started http://wso2.org/library/3032

PHP Web Services: After Getting Started http://wso2.org/library/3056

PHP Web Services: Messaging – SOAP and REST http://wso2.org/library/3261

Writing Simple PHP Test Scripts For PHP Web Services http://wso2.org/library/3579

WSO2 WSF/PHP Interoperability with Microsoft WCF http://wso2.org/library/3125

WSO2 WSF/PHP – PHP Web Services Extension http://wso2.org/library/2570

PHP Web Services with WSDL http://wso2.org/library/3393

Running WSF/PHP on The Uniform Server http://wso2.org/library/3262

Installing WSF/PHP with PHP5 on IIS http://wso2.org/library/3465

How to Setup WSO2 WSF/PHP Build Environment on Windows XP http://wso2.org/library/tutorials/setup-wso2-wsf-php-build-environment-windows-xp

WSF/PHP Demo Site http://labs.wso2.org/wsf/php

PHP Web Services Blog http://phpwebservices.blogspot.com/

Getting Started