Joined: 23 Oct 2006 |
Posts: 3 |
|
|
|
Posted: Mon Oct 23, 2006 6:29 am |
|
|
|
|
|
macrovan wrote: | you can use:$server->addAttachment(); |
how is the syntax for wsdl file?
and how can a client get this file?
this example works,but i have to response from the server with attachemnt..
server
$server->wsdl->addComplexType(
'hrbIndexRquest',
'complexType',
'struct',
'all',
'',
array(
'Timestamp' => array('name'=>'Timestamp','type'=>'xsd:string'),
'Complete' => array('name'=>'Complete','type'=>'xsd:boolean')
)
);
$server->wsdl->addComplexType(
'hrbIndexResponse',
'complexType',
'struct',
'all',
'',
array(
'Url' => array('name'=>'Url','type'=>'xsd:string'),
'Timestamp' => array('name'=>'Timestamp','type'=>'xsd:string'),
'Complete' => array('name'=>'Complete','type'=>'xsd:boolean'),
'Error' => array('name'=>'Error','type'=>'xsd:string')
)
);
$server->register(
'hrbIndex',
array('input'=>'tns:hrbIndexRquest'),
array('return'=>'tns:hrbIndexResponse'),
$cfg["soap"]["space"]);
function hrbIndex ($x)
{
global $cfg;
$res['Timestamp']=fileatime($cfg["index"]["com"]);
$res['Complete']=$x["Complete"];
$res['Url']=$cfg["soap"]["space"]."/";
//here i have,to make the attachment
return $res;
}
$server->service($HTTP_RAW_POST_DATA); |
client
$param = array('Timestamp' => "20061018123400",
'Complete' => "1"
);
$client = new soapclient('http://www.XXXX.de/nusoap/server.php');
$response = $client->call('hrbIndex', $param); |
|
|
Joined: 23 Oct 2006 |
Posts: 3 |
|
|
|
Posted: Thu Nov 09, 2006 1:56 am |
|
|
|
|
|
macrovan wrote: | Attachment is in the httpBody
you can send/receicve from the soap message!
$server->addAttachment();//send
$client->getAttachment();//receive |
thank you it seems good,
can you recommend me some simple tutrial for using nusoapservermime?
|
|