English 中文(简体)
使用 PHP NUSOAP 是坏主意吗?
原标题:Is using PHP NuSOAP a bad idea?
  • 时间:2012-05-24 22:48:50
  •  标签:
  • nusoap

我在这里的某个地方读到 使用 NuSoap 不是一个好主意, 它已经不存在了。 如果是这样, 创建 WSDL 文件的最佳解决方案是什么。 我只是为创建 wsdl 文件而做 nusoap, 我从来没有让网络服务起作用 。

问题回答

NSOAP已不再发展,而且已经有一段时间没有发展了。

我查看了目前大多数的PHP肥皂选项, 并选择了Zend_Soap_Server, 特别是因为其AutoDiscovery 的组成部分。

AutoDiscovery 的要点是 WSDL 来自于代码内的文档区块。 只要你遵循正确的常规, 组件将为您建立一个完善的 WSDL 。

如果您不想使用一个框架, 您可以只包含文件服务器. php、 Auto Discover.php 和 Wsdl.php 。 我这样做:

    require_once  Zend/Loader.php ;
    require_once "Zend/Loader/Autoloader.php";

    $autoloader = Zend_Loader_Autoloader::getInstance();

    Zend_Loader::loadClass( Zend_Soap_Server );
    Zend_Loader::loadClass( Zend_Soap_AutoDiscover );
    Zend_Loader::loadClass( Zend_Soap_Wsdl ); 

同样值得记住的是,自动发现单是不是 SOAP 服务器, 它只会生成您的 WSDL 。 所以理论上, 您可以使用它来创建 WSDL, 但如果你想使用不同的 SOAP 服务器, 也就是说, 本地 PHP 服务器( 它不会生成 WSDL ) 。 但是, 您将装入 Zend Soap 服务器, 不使用IMO 似乎有点浪费 。

如果你和PHP4一起工作 这可能是你唯一的选择

使用 PHP5, 您可以使用 Zend Soap 。

我用的是Nusoap和php 5.2.5。工作对我很好。但我从来没有用高压测试过它。

和MacMan一样,我用的是php 5.2.17, 效果很好,很轻松,我猜是本地的PHP SOAP。





相关问题
Silverlight and PHP nuSOAP communication problem

I am writting a silverlight application in which I want to call the php webservice written using NuSOAP. here is the WSDL of webservice <?xml version="1.0" encoding="ISO-8859-1" ?> - <...

Can nusoap returns arrray of string?

I would like to return an array of string in my web services I ve tryed : <?php require_once( nusoap/nusoap.php ); $server = new soap_server(); $server->configureWSDL( NewsService , urn:...

Convert old NuSoap code into PHP core soap functions

I ve been testing nuSoap with codeIgniter (PHP Framework) but seems nuSoap isn t prepared to work with latest php 5.3, even if I download a patched nusoap version for php 5.3 I have the following ...

PHP5 SOAP XML into Array

I currently have a return from a SOAP call. <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <ns:getMakeResponse xmlns:ns="http://ws.fds....

Sugar CRM Soap call not working properly

I have sugar crm instance and i was trying to get some data from it using soap service. Below is the code which i am using for it. When i run the same code , sometimes it is returning correct data, ...

Silverlight and NuSoap

EDIT: After some research, I found the answer to the problem (at least it works for my particular situation). Instead of the register call noted down below, I am now using the following call: $soap-&...

nuSoap or Zend Soap? [closed]

I would like to know the differences between nusoap and ZendSoap, which is the best? what benefits and disadvantages of each? Anyone who has used both technologies could make this comparison? Thank ...