note 83035 rejected from ref.soap by felipe
| From: | felipe@php.net | Date: | Thu, 08 May 2008 03:42:23 +0000 |
| Subject: | note 83035 rejected from ref.soap by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-139161@lists.php.net to get a copy of this message | ||
Note Submitter: sanjiv dot more at abbott dot com
----
Don't know why I am getting following error:
SoapFault exception: [SOAP-ENV:Server] Procedure 'text' not present in
C:\xampp\htdocs\SOAP\repeaterClient.php:6
My Clent is:
<?php
$client = new SoapClient('http://localhost/SOAP/RepeaterServer.wsdl');
try {
echo $client->repeat("Hello ",3);
} catch (SoapFault $exception) {
echo $exception;
}
?>
My Class is:
<?php
class Repeater {
/**
* Repeats a string of text a number of times
*
* @param string $text
* @param integer $times
* @return string
*
*/
function repeat($text, $times){
return str_repeat($text,$times);
}
/**
* reverse a string of text and reapeat it a number of times
*
* @param string $text
* @param integer $times
* @return string
*
*/
function reverseRepeat($text,$times) {
return $this->repeat(strrev($text),$times);
}
}
// Expose as a Web service
$server = new SoapServer("http://localhost/SOAP/RepeaterServer.wsdl");
$server->setClass('Repeater');
$server->handle();
?>