Ran across another instance of the dreaded Error 2032: Stream error today and upon tracing I discovered the cause. I'm consuming a web service that gets passed a criteria object consisting of numbers, booleans, and strings, however, all values are optional and on the .Net side are nullable. Upon tracing my web method call (which was generated using the Import Web Service (WSDL) tool in Flex) I noticed that when I didn't set the numeric values, I was getting the stream error and I think it's due to number objects being NaN by default. Since these parameters are optional for the .Net side (and actually change the return data if set) but numbers can't be null on the Flex side, I'm wondering if anyone has discovered this issue and/or thought of a solution for it.
As I stepped through my soap call, I added xsi:nil="true" to the soap body for the numeric fields and the web request was processed correctly. Obviously I am not going to be able to do this for all of my calls. If anyone can help, I would greatly appreciate it.
As a quick fix, and until I can find a better solution, I had the web service changed to check for values of -1 for the number parameters which they processed to remove the values and set them to null on the server side. I looked for an answer to this on Google and was surprised that more people hadn't come up against this issue before.