Jump to content

NuSoap or PHP's own SOAP library?

- - - - -

  • Please log in to reply
3 replies to this topic

#1
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 765 posts
I am about to port some of my codes into web service and looks like PHP is the faster route. But I am hesitate to choose whether to use NuSoap (which I believe the most popular soap library in PHP) or PHP's own SOAP library. The latter has the advantage of speed (since it's an extension written in C) but has main disadvantage of not (yet) be able to generate wsdl automatically.

So which one do you suggest me to use? And why (perhaps I have missed something from my research)?

Thank you!

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
I've read enough to contribute something to further the discussion I believe. PHP5's SOAP client is like SimpleXML in various ways, it is lightweight and relatively bug free as it was slowly but surely put in to the core libraries of PHP5. You could of course try NuSoap which is what people are tending to do, but it is pre-1.0 and written in pure PHP, this has its obvious disadvantages that it may be slow compared to a compiled library, and that it is essentially a beta.

PHP has an extension library called PEAR (PHP Extension and Application Repository) which often contains extensions that are likely to be put in to the PHP core, or have dropped out, or remain as a useful resource to developers (much like Perl has its huge repository), and there is a SOAP extension there named PEAR::SOAP that can be another option that I recommend over PHP5's.

The best I would say out of the bunch is in fact part of the Zend framework, which has a SOAP library which is in fact based on and not a replacement of PEAR::SOAP which contains easy WDSL handling and some improvements, although I can not say much about that as I've not personally used it.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 765 posts
@Alex: your points are exactly what made me hesitate to choose between the two. On the SOAP lib of Zend framework, I simply don't have enough experience with php to know that framework, lol. My fault, indeed. But my main goal is to port my codes as soon as possible, and looks like the nuSoap is the faster route, especially with the wsdl generation on the fly and the fact that we can simply upload the library into any webhost (in case they don't have zend framework or disable PHP's SOAP extension).

I think at the moment i have to choose nusoap (with a little mod for it to generate wsdl to the style that I prefer).

#4
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,124 posts
  • Location:Vancouver, Eh! Cleverness: 200
I believe PEAR::SOAP has wsdl generation (In the change log it was listed that it was fixed), although I cannot find any easy to access documentation or it as as a main feature so I had now known, maybe it is better look in to that PEAR extension if you want something more stable or trustworthy on PHP5's platform, but still NuSOAP is still always valid :)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users