Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

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:

share|improve this question
add comment

1 Answer

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?

share|improve this answer
    
Thanks for the answer. I agree it would be good to abstract, but not immediately. I think one needs a fair amount of experience in several of the libraries otherwise one risks violating the principle of YAGNI. I did ask on StackOverflow but they discuss in abstract terms and don't know the limitations WordPress plugin developers should consider. BTW, didn't get much of use over there. What I really want is all clients to recognize that they are asking for trouble with SOAP vs. RESTful web services. –  MikeSchinkel Apr 27 '11 at 5:24
    
@Mike: Indeed, an important difference is that this is for your own plugin, not an API that others will extend on? Then indeed you have more freedom to change you inner code and abstract later. –  Jan Fabry Apr 27 '11 at 6:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.