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. Also as a quick, more permanent fix, I got together with the .Net guys and had them check the value for -1 and if the value was -1, they set the value to null.