1 Reply Latest reply on Apr 7, 2009 3:51 PM by shawnyale

    Flex 3.3 Web Service and .Net: Nullable Number Parameters

    shawnyale

      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.

       

      Shawn