Failed to print "Hello user"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everybody, I am new php programmer.  I have no idea about Soap
server/client, but I need it for my project.
I just want to request to the server and get "Hello $username" as respond.
Can any one help me please?

All these files are from http://www.wso2.org/node/1060/.
My hello.wsdl can be found above address. I don't know if need to modify
this file (hello.wsdl) or not. I copied and paste.
........................................................................

This is my server.php file.
//server.php
<?php
function greet($param)
{
	$retval = 'Hello '.$param->name;
	$result = array('greetReturn' => $retval);
	return $result;
	}
	$server = new SoapServer('hello.wsdl'); //not sure of this
	$server->addFunction('greet');
	$server->handle();

?>

and this is my client file
//client.php
<?php
try
{
	$client = new SoapClient('server.php'); //I am not sure of this.
	$result =  $client->__soapCall('greet', array(array('name' => 'Abdi')));
	echo "Result = ". $result->greetReturn;
	//printf("Result = %s\n", $result->greetReturn);
	}
	catch (Exception $e)
	{
		echo "Error message = ".$e->__toString();
		//printf("Message = %s\n",$e->__toString());
	}

?>   
//End client.php.




This what I am getting when I run client.php:

Error message = SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:
Couldn't load from
'/var/www/clients/www.firmanettiin.fi/docs/projektit/bsf_dummy/server.php'
in
/var/www/clients/www.firmanettiin.fi/docs/projektit/bsf_dummy/client.php:4
Stack trace: #0
/var/www/clients/www.firmanettiin.fi/docs/projektit/bsf_dummy/abdi_soap_client.php(4):
SoapClient->SoapClient('abdi_soap_serve...') #1 {main}  

//................................................END........................................
Thank you in advance for any help
-- 
View this message in context: http://www.nabble.com/Failed-to-print-%22Hello-user%22-tf3637536.html#a10157591
Sent from the Php - Soap mailing list archive at Nabble.com.

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux