logo       

About SOAP Server: msg#00000

php.nusoap.general

Subject: About SOAP Server

Hi all,
I have to develop an Web Services Server using NuSoap.
This server must provide to a known client some information that the client
gets calling several procedures running within my Soap Server.
The procedures (functions) are: getDataSet_1($some_param),
getDataSet_2($some_param), getDataSet_3($some_param). The client calls one
procedure after he gets and processes the SOAP Server's answer to the
previous one.
I have two questions:
1. What is the better way to structure my server (taking into account
reasons as
security threads, execution time, required space on HDD, server
persistence, etc.):
a. a single script (let's say getDataSetServer.php) that defines a
single SoapServer
as follows:
<?php
require('nusoap.php');
$s = new soap_server;
$s->register('getDataSet_1');
$s->register('getDataSet_2');
$s->register('getDataSet_3');
function getDataSet_1'($some_param)
{
some_code;
return $dataset_1;
}
function getDataSet_2'($some_param)
{
some_code;
return $dataset_2;
}
function getDataSet_3'($some_param)
{
some_code;
return $dataset_3;
}
$s->service($HTTP_RAW_POST_DATA);
?>
or
b. To have separate scripts each script containing a SOAP Server
(e.g. getDataSet_1Server.php, getDataSet_2Server.php,
getDataSet_3Server.php).
For example the page getDataSet_1Server.php should look like this:
<?php
require('nusoap.php');
$s = new soap_server;
$s->register('getDataSet_1');
function getDataSet_1'($some_param)
{
some_code;
return $dataset_1;
}
$s->service($HTTP_RAW_POST_DATA);
?>
,and so on the other two scripts.

2. The second question: Supposing the script presented above
(getDataSet_1Server.php )
will look like this:

<?php
function f_1($arg_1)
{
some code;
return $something;
}
require('nusoap.php');
$s = new soap_server;
$s->register('getDataSet_1');
function getDataSet_1'($some_param)
{
some_code;
$a = f_1($p1);
code;
return $dataset_1;
}
$s->service($HTTP_RAW_POST_DATA);
?>
Are there some security threads if using this configuration?
Should I also register the callback function f_1($arg_1) within the Soap
Server or
should I keep all the tasks within the registered function and eliminate any
callback function ?

Thanks !



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise