Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why use NuSOAP rather than PHP SOAP? Any benefits?

As far as I have scourged the web, I can see an abundance of articles on how to setup NuSOAP and use it to setup a SOAP server and client in PHP.

However, none of them seem to point to any advantages of using it than PHP's own native SOAP library. What are the pros/cons between:

  • NuSOAP
  • PHP
  • SOAP
  • PEAR::SOAP
  • Zend SOAP
like image 228
YD8877 Avatar asked Apr 28 '10 09:04

YD8877


People also ask

What is NuSOAP PHP?

The NuSOAP library is a collection of PHP classes that is used for sending and receiving SOAP messages using the HTTP protocol. The NuSOAP library can be downloaded from the Sourceforge link.

What is NuSOAP in web services?

NuSOAP (formerly SOAPx4) is a toolkit which provides simple API for building web services using SOAP. NuSOAP current version is 0.6.


2 Answers

NuSOAP generates WSDL.

PHP's SoapServer does not.

That is why I decided to use NuSOAP.

For client, I use native client, it has better error reporting.

like image 68
Shinhan Avatar answered Sep 28 '22 14:09

Shinhan


PHP's SoapClient class requires PHP5 or above. Nusoap and Pear Soap run on PHP4. That's the main difference. At last check NuSoap wasn't officially compatible with PHP5. I had to find a port someone put on google code in order to run it under php5.

That's pretty much it. Although I have run into random weird WSDL parsing issues when using PHP's SoapClient as opposed to NuSoap. Most notably netenberg.com's licensing API. But basically if you are running PHP5, you'll probably just want to use PHP's SoapClient and save yourself the hassle of using an external library

like image 38
Mark Avatar answered Sep 28 '22 16:09

Mark