Check out my latest product, BuildFactory

I have the I.Q. of a toaster

A lot of my work deals in terms of web services nowadays, such as XML-RPC, and SOAP.

I discovered something quite interesting while working with a few sets of XML-RPC web services that required boolean values to be passed to them as part of the general XML data structure.

One might assume, just pass it CoreServices a "BOOL" value. Bzzzt. How about an integer, the whole zero or one thing from the olden days when people still used ANSI C....bzzzt. What about a string containing "true" or "false"....bzzzt. A string containing "0" or "1" wrong again!

Whether it be something specific with the APIs provided by the web site, or whether it be the CoreServices.framework API itself, none of the above will work.

As it turns out, throwing a boolean into your SOAP/XML-RPC calls needs to be a kCFBooleanTrue or a kCFBooleanFalse.

That's an hour of my time I'll never get back.

  • Posted: 19/03/06 06:04AM
  • Category: Programmr

Replies

Well, now that you'd jotted this down, hopefully you'll never waste another moment on it.

Write reply

This item is closed, it's not possible to add new comments to it or to vote on it
www.flickr.com