简体   繁体   English

如何在PHP中使用Soap Client从wsdl获取功能列表

[英]How to Fetch Function List from wsdl with soap client in php

I have one http: path and one wsdl file. 我有一个http:路径和一个wsdl文件。 but it is not work in local ip and server ip. 但是在本地IP和服务器IP中不起作用。 it is work only mobile. 它只能在移动设备上使用。 i want to check this webservice is working is not working. 我想检查此网络服务是否正常工作。 If working, i want to get function list from wsdl. 如果工作,我想从wsdl获取功能列表。 How it? 如何?

Plz help me as soon as possible. 请尽快帮助我。

This will list the available functions from the service: 这将列出服务中的可用功能:

$client = new SoapClient('http://hostsite');
var_dump($client->__getFunctions());

You can use the BubbleSOAP php script: 您可以使用BubbleSOAP php脚本:

try{
   $client = new BubbleSOAP($wsdl_url);
   $list=$client->__getFunctionsNames();
   foreach($list as $name){
      echo $name;
   }
}
catch(Exception $e){
   echo $e->getMessage();
}

https://github.com/andreaval/Bubble-SOAP https://github.com/andreaval/Bubble-SOAP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM