note 108985 added to soapclient.construct
| From: | goldfisch2233 at web dot de | Date: | Sun, 10 Jun 2012 14:34:39 +0000 |
| Subject: | note 108985 added to soapclient.construct | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188515@lists.php.net to get a copy of this message | ||
// Workin Server with Client for localhost
// server.php
<?php
class MyClass {
public function helloWorld() {
return 'Hallo Welt '. print_r(func_get_args(), true);
}
}
try {
$server = new SOAPServer(
NULL,
array(
'uri' => 'http://localhost/soap/server.php'
)
);
$server->setClass('MyClass');
$server->handle();
}
catch (SOAPFault $f) {
print $f->faultstring;
}
?>
// client.php:
<?php
$client = new SoapClient(null, array(
'location' => "http://localhost/soap/server.php",
'uri' => "http://localhost/soap/server.php",
'trace' => 1 ));
echo $return = $client->__soapCall("helloWorld",array("world"));
?>
// Hope you like it
----
Server IP: 69.147.83.197
Probable Submitter: 91.54.12.98
----
Manual Page -- http://www.php.net/manual/en/soapclient.construct.php
Edit -- https://master.php.net/note/edit/108985
Del: integrated -- https://master.php.net/note/delete/108985/integrated
Del: useless -- https://master.php.net/note/delete/108985/useless
Del: bad code -- https://master.php.net/note/delete/108985/bad+code
Del: spam -- https://master.php.net/note/delete/108985/spam
Del: non-english -- https://master.php.net/note/delete/108985/non-english
Del: in docs -- https://master.php.net/note/delete/108985/in+docs
Del: other reasons-- https://master.php.net/note/delete/108985
Reject -- https://master.php.net/note/reject/108985
Search -- https://master.php.net/manage/user-notes.php