石鹸を介してオブジェクトの機能を公開するために次のことを行っていますが、エラーとして表示されます
サーバー:
$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() の呼び出し: 15 スタック トレース: #0 /home/ imran/projects/firstmobile/simple_client.php(15): SoapClient->__soapCall('geolocate', Array) #1 {main} が 15 行目の /home/imran/projects/firstmobile/simple_client.php でスローされます