Embedding a SOAP Client into a WordPress Plugin?

What is the best way to embed a SOAP client into a WordPress plugin that one would distribute via the WordPress plugin repository? Is it best to use?

  • The PHP 5.x Soap Client,
  • The Zend Soap Client,
  • The NuSoap Toolkit for PHP,
  • The PEAR SOAP Client/Server for PHP, or
  • Some other SOAP client for PHP?

What’s more, why recommend the one you do? And what are the pros and cons of each. “Bonus (karma) points” if you have actual experiences with using a SOAP client in widely a distributed plugin. And are there any differences between calling a .NET SOAP server, a Java SOAP server, or some other SOAP server stack?

Note this is a related question to the question “Pitfalls when Distributing Plugins that Access SOAP Web Services?” and I’m also making this a a community wiki.

Update

Here are some potentially helpful links for others researching this same question:

  • Make a SOAP client using PHP and NuSoap.
  • Soap Client calling .NET Web service
  • Using SOAP with PHP (on Apple.com)
  • PHP & Web Services
  • Programming with NuSOAP Using WSDL
  • Using Amazon Web Services With PHP And SOAP
  • The simplest PHP Web Service Client
  • Developing SOAP Web Services with PHP/C#
  • A PHP Web Services Client

1

I would abstract the specific SOAP library away, so you can add support for more clients later. Similar to how WP_Http is a proxy for multiple HTTP implementations, and chooses depending on the server capabilities.

I must have played with some of these libraries before but I don’t remember which one. In general I prefer included PHP modules over external code, because they are more likely to be kept up-to-date and don’t require extra overhead (sometimes you need to bootstrap a framework to use one part of it).

It might be a good idea to create an answer for each library so we can add pros and cons to them. Or is this more generic question a better fit for the “real” Stack Overflow?

Leave a Comment