UML2PHP5 -> Support::SOAP Server
Version fran├žaise

UML diagram
Diagramme UML: SOAP
UML2PHP5 generates the SOAP server PHP script soap_server.php
Support by UML2PHP5
Constraint Supported
Generate a require_once statement for used class YES
Generate a case statement for each port (class) YES
File: soap_server.php
<?php
/**
 * Code generated by dia-uml2php5 plugin
 * written by KDO kdo@zpmag.com 
 */

if (empty($_GET['action'])) {
	die('SOAP server error');
}
 
// disabling WSDL cache
ini_set('soap.wsdl_cache_enabled', FALSE);
$server = new SoapServer('Webservices.wsdl');

// Selecting SOAP action
switch ($_GET['action']) {
	case 'Quotes':
	case 'KDO':
		require_once($_GET['action'].'.class.php');
		$server->setClass($_GET['action']);
		break;
	default :
		die('SOAP server error');
}
$server->setPersistence(SOAP_PERSISTENCE_SESSION);
$server->handle();
?>
A simple SOAP client
Exemple
<?php

ini_set('soap.wsdl_cache_enabled', 0);
$client = new SoapClient('http://localhost/Webservices.wsdl'); 

echo 'My adresse is '.$client->getEmail().'<br>';
echo '15 + 100 = '.$client->add(15,100).'<br>';
echo '45 + 5 = '.$client->add(45,5).'<br>';

?>

Valid XHTML 1.1! Valid CSS! Mozilla Homepage Apache Web Server! PHP: Hypertext Processor MySQL: Open Source Database
Get Firefox!