【问题标题】:nusoap XML error parsing WSDLnusoap XML 错误解析 WSDL
【发布时间】:2012-02-24 16:30:44
【问题描述】:

我使用 nusoap 调用一个 ASP.NET 方法,看起来像(在 .NET 中调用该方法)

Dim obj As New ct400.WSConnector
objWS.someMethod ("a", "b", "c", "d", "e", "f","g");

(除此之外,我没有关于此 Web 服务方法的更多文档。)

这是我用来调用 PHP 方法的代码

  $uri="192.x.x.x/somefolder/somefile.asmx;
  $client = new nusoap_client ($uri,true);
  $param = array("a","b","c","d","e","f","g");
  $response = $client->call('methodname', $param);

服务器应以简单的“数据已保存”“数据未保存”响应

在转储响应时,我什么也得不到。 转储错误时 ($client->getError()) 我收到了那个烦人的无用信息:-)

XML 解析来自http://192.x.x.x/somefolder/somefile.asmx 的 WSDL 时出错 第 75 行:标签不匹配

我在这里做错了什么?

【问题讨论】:

    标签: php web-services soap wsdl nusoap


    【解决方案1】:

    你需要像这样设置数组参数:

    $params = array('P1'  => $val1,'P2'=> $val2);
    //and call it like this in order to get .net understand your request (only for nusoap)
    $result =$client->call('yourwsmethod', array('parameters' => $params)); 
    var_dump($result);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 1970-01-01
      • 2011-02-04
      • 1970-01-01
      • 2019-04-04
      • 2011-09-11
      • 1970-01-01
      相关资源
      最近更新 更多