The 'dataObj' object can be both of DataClass and SimpleDataClass class in according to circumstances. Could you please check the class first and then re-type the object to appropriate class? Please see example at http://msdn.microsoft.com/en-us/library/scekt9xw.aspx