我正在执行以下操作以通过肥皂公开对象的功能,但它给了我错误
服务器:
$soap_wrapper = new my_geo_soap_wrapper();
$soap_wrapper->set_geo_app($my_geo);
$server = new SoapServer(null, array('uri' => "urn://localhost/firstmobile"));
$server->setObject($soap_wrapper);
$server->handle();
客户:
$client = new SoapClient(null, array(
'location' => "http://127.0.0.1/firstmobile/simple_server.php",
'uri' => "http://127.0.0.1/firstmobile/"
));
$result = $client->__soapCall("geolocate",array($lat,$lng));
print $result;
错误:
致命错误:未捕获的 SoapFault 异常:[SOAP-ENV:Server] 在 /home/imran/projects/firstmobile/simple_client.php:15 中的非对象上调用成员函数 geolocate() 堆栈跟踪:#0 /home/ imran/projects/firstmobile/simple_client.php(15): SoapClient->__soapCall('geolocate', Array) #1 {main} 在第 15 行的 /home/imran/projects/firstmobile/simple_client.php 中抛出