Adventures in PHP, SOAP and WSDL
So, this week I've been working heavily with PHP, consuming full-blown SOAP web services, which I had only dealt with casually in the past. The last time I used SOAP and PHP, I used NuSOAP, but, apparently, there's a namespace collision between NuSOAP and the new PHP SOAP library.
Given that this is for a client, and namespace collisions aren't likely to be won by 3rd party libraries, I'm using the included library from PHP5. However, that's all just background to my general surprise at just how primitive most of the tools in PHP are at dealing with SOAP. SOAP 1.1 was submitted as a standard back in 2000, 6 years ago.
For the basic stuff, it works well enough, but, when it came time to code a test server to work with until the real one was finished, I had to generate a WSDL file and discovered that I was pretty much stuck doing it manually. The library provides a way to construct a service *given* a WSDL file, but how you get it is up to you.
This isn't entirely unreasonable, since a WSDL needs strongly typed variables, which PHP doesn't do, but there's not even a mechanism to more explicitly cast variables and turn that into a WSDL.
Anyway, it turns out that someone put together a nice little tool for generating them, so you can keep up with Dotnet Jones next door and your SOAP services can have their very own WSDL's as well.
For a bonus game, read this post out loud to someone who doesn't do web development and take a picture of the look they give you.

