ColdFusion is supposed to make life easy – WDDX & Webservices

I've just wasted most of an afternoon trying to get a CF webservice working. Turns out the problem was not directly with the webservice but with the data that I was passing into it.

The data was coming from a WDDX packet which contained an Array. As documented by Cameron Childress there is a subtle problem when creating arrays from WDDX.

The problem is that the WDDX Array gets converted to a java.util.Vector instead of a coldfusion.runtime.Array object. CFDump shows the unWDDXed Array as a proper array – but if you try to pass it of so a WebService the webservice give the very helpful error:
argument type mismatch

This is a very nasty little bug and unfortunately is not fixed in CF8. Hopefully in CF9.

This post was posted in , by on