1 Reply Latest reply on Sep 28, 2011 5:05 AM by Amy Blankenship

    How Do You Detect a nil="true' value on XML that is passed back from webservice call?


      I am receiving xml from a webservice call that contains a nil="true":      

             <systemFK nil="true"/>



      I used the Flex DataService (webservice) wizard to create the service object for the <code>cacheEntry</code> component.  This object will be serialized later on a different webservice call and stored in a database.

      I set a breakpoint on the <code>set SystemFK </code> method in the service object. It appears that the value passed in was an empty string! Allowing this value to be an empty string will cause problems in the webservice implemenation in Java on the other side. Since the database value was "null" it is expecting a null in return, If I avoid setting this value, the service object should send back a null which will make the database happy. In order to do that, I need to be able to know when a "nil = true" is present in the XML.


      How can I detect that a "nil = true" is present in the XML in order to avoid setting this value?      


      I am working with Flex 4