At work I've been preparing a new web service for our licensees to use. It's not just a content feed, like most examples of web services that you hear about; instead, it's a financial tool, where the licensee offers the tool's interface on their site, calls our site with the user's data, and then displays the calculated results that we send back. I decided that in order to make the licensee's own development work go smoothly, we should test out the new service ourselves from another server in another programming language-- we should eat our own dog food, in other words. The challenges that we found was in generating and serializing complex datatypes in PHP, and in deserializing those datatypes back to structs in our web service. Here's how we resolved it.