dtq26360 2011-10-31 22:32
浏览 54
已采纳

找不到肥皂功能

So I am trying to connect using SoapClient but am running into issues.

$this->client = new SoapClient(self::parser_url . '/SovrenConvertAndParse/ConvertAndParse.asmx?WSDL',array('soap_version' => SOAP_1_2
    ));
var_dump($this->client);
var_dump($this->client->__getFunctions());
try { var_dump($this->client->GetVersionInfo());}
catch (Exception $e){echo $e->getMessage();}

And here are the results I get:

object(SoapClient)#32 (2) {
  ["_soap_version"]=>
  int(2)
  ["sdl"]=>
  resource(42) of type (Unknown)
}

array(30) {
...
  [18]=>
  string(65) "GetVersionInfoResponse GetVersionInfo(GetVersionInfo $parameters)"
...
}

Not Found

Seems like if the function shows up in getFunctions() then I should be able to call it, and it should be findable. No? What could cause something like this?

So I also tried it without the try/catch and I get the following error:

Fatal error: Uncaught SoapFault exception: [HTTP] Not Found in /path/to/file:29

Anyone have any ideas as to what could be going on and how to fix this?

  • 写回答

2条回答 默认 最新

  • dqjl0906 2011-12-09 23:07
    关注

    I'm from Sovren and I just stumbled across this post. Since you didn't contact us for support I'll assume you've already resolved this problem. But for other readers, I've run the following file with PHP 5.2.12 and the call to GetVersionInfo responded correctly with both SOAP_1_1 and SOAP_1_2:

    <?php
    $client = new SoapClient(
        'http://localhost/SovrenConvertAndParse/ConvertAndParse.asmx?WSDL',
        array('soap_version' => SOAP_1_2));
    var_dump($client);
    var_dump($client->__getFunctions());
    try { var_dump($client->GetVersionInfo());}
    catch (Exception $e){echo $e->getMessage();}
    ?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 对于知识的学以致用的解释
  • ¥50 三种调度算法报错 有实例
  • ¥15 关于#python#的问题,请各位专家解答!
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败