|
PHP, XML, XSL, XPATH and Web Services
This could be the start of something beautiful …
This could be the start of something beautiful …
A Web Service implementation in PHP
PHP provides an ideal platform to implement Web Services. There are numerous PHP libraries available to make this
as easy and painless as possible. The library used here is called NUSOAP . The following is a code snippet of how
you would expose a PHP function as a Web Service method.
<?php
require_once('nusoap.php');
$server = new soap_server;
$server->register('get_siteuser');
$server->register('get_siteuser_list');
function get_siteuser($user_id)
{
}
function get_siteuser_list($siteuser)
{
}
?>
NUSOAP also provides Web Service client-side libraries. The following is example code for invoking a Web Service:
<?php
require_once("nusoap.php");
$soapclient = new soapclient("http://localhost/~ nmcengine.php");
echo $soapclient->call('get_siteuser',array('user_id'=>"$arg1"));
?>
As you can see calling a web service using PHP is simply three lines of code. You may have noticed that WSDL
is not being used to invoke the web service. NUSOAP libraries provide functionality to create the WSDL which will
be needed if the web service is being invoked by other means in PHP or a different programming language.
The Content Engine
The Content Engine simply provides an XML based interface to the database schema. The Content Engine interface maps
directly onto the tables, their attributes and the relationships between the tables. Given the following simplified
schema:
| Comments: | ||
| Cool but yet... | Hakan | 02/16/05 09:41 |
| And how about those fairies? | Sex Beplaced Ru | 12/07/04 09:44 |
| why stop there? | Schmell | 07/14/04 21:42 |
| What's all this about? | DaDuke | 05/15/04 10:28 |
| Dangers of abstraction | Benjamin Smith | 05/06/04 14:47 |
| plateform in devellopement phpMyOffice | Thiamat | 05/05/04 06:37 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


