Skip to content

Identifying client address by server #3

@GoogleCodeExporter

Description

@GoogleCodeExporter
I have a question regarding a identifying the client by server. When I
write a simple helloworld server and client codes all wsdl and other
functions are working. But I want to identify the requesting client in
server code and respond (To set in return value in hellowold function) that
client address back to client. Please help me to solve this.  


My nusoap.php in lib folder and all code in 'http://localhost/services/'  


Cleint code:  
require_once('./lib/nusoap.php');  
$client = new nusoap_client('http://localhost/services/server.php?wsdl',
'true');  
echo $result = $client->call('helloworld');  



Server code: (server.php)  

require_once('lib/nusoap.php');  
$server = new soap_server();  
$server->configureWSDL('hellowsdl','urn:hellowsdl');  

$server->register('helloworld',  
array('name' = 'xsd:string'),  
array('return' = 'xsd:string'),  
'urn:hellowsdl',  
'urn:hellowsdl#hello',  
'rpc',  
'encoded',  
'Says hello to the caller'  
);  

function helloworld()  
{  
return "Hi, ";  
// I want to return requester(Client) address (Ip or url)
here..................  
// Return (This is your address.............)  
}  
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);

Original issue reported on code.google.com by samuda...@gmail.com on 21 Apr 2009 at 11:28

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions