douxiongye5779 2015-03-06 06:42
浏览 32
已采纳

PHP错误SoapClient getProxy()

Getting this error while using soap service php :

Fatal error: Uncaught SoapFault exception: [Client] Function ("getProxy") is not a valid method for this service in C:\webserver\www\feeder\index.php:7 Stack trace: #0 C:\webserver\www\feeder\index.php(7): SoapClient->__call('getProxy', Array) #1 C:\webserver\www\feeder\index.php(7): SoapClient->getProxy() #2 {main} thrown in C:\webserver\www\feeder\index.php on line 7

here's my code :

<?php 
$wsdl = "http://localhost:8182/fg/live.php?wsdl";

$username = "aaaaa";
$password = "123456";

$client = new SoapClient($wsdl);
$proxy = $client->getProxy();

$token = $proxy->GetToken($username, $password);
var_dump("Get Token = ".$token);

$table = $proxy->ListTable($token);
var_dump("Tabel = ".$table);
?>

There's something wrong with my code ?

  • 写回答

1条回答 默认 最新

  • douxieshang5577 2015-03-06 07:00
    关注

    Please have a look at the PHP SoapClient Doku, there is no getProxy-Method. The client itself calls the functions defined in wsdl:

    $token = $client->GetToken();
    $client->ListTable($token);
    

    And make shure, that you check $token, if it's really a single variable, or if it is an object.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 Macbookpro 连接热点正常上网,连接不了Wi-Fi。
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 linux驱动,linux应用,多线程