none
Unexpected behavior between wp7 client and wcf service azure hosted RRS feed

  • Question

  •  

    I'm consuming WCF service hosted on azure web role there are defined the following data contracts:

    [DataContract]
        public class CommonEntry
        {
            [DataMember]
            public string Id { get; set; }

            [DataMember]
            public string Domain { get; set; }

            [DataMember]
            public string Title { get; set; }

            [DataMember]
            public DateTime Start { get; set; }

            [DataMember]
            public DateTime End { get; set; }

            [DataMember]
            public string Description { get; set; }

            [DataMember]
            public int Attendees { get; set; }

            [DataMember]
            public bool CanNotify { get; set; }

            [DataMember]
            public string Link { get; set; }
        }

     

    [DataContract]
        public class Church :CommonEntry{}

        [DataContract]
        public class Meeting:CommonEntry{}

        [DataContract]
        public class Service : CommonEntry { }

     

    the service contract of this service define CRUD operations for Service, Meeting and Church as wcf methods.

     

    My client is wp7 app, the wcf client reference was generated using VS 2010, setting System.Collections.Generic.List as "Collection type" and "Always generate message contracts" option unchecked.

    The unexpected behavior between client and server resides when passing instances of Service, Meeting or Church the wcf service method get the parameters where it's data members have default values, namely the right values are missing.

    Thanks in advance.

    Regards

    denis estevez

     

    Thursday, January 19, 2012 7:32 AM

Answers

  • applying known types attributes didn't fix the wrong behavior. The right solution was to delete CommonEntry type and up data members to Service, ChurchEvent and Meeting.

    Thanks in advance.

    Regards

    denis estevez

    • Marked as answer by denis estevez Friday, January 20, 2012 5:13 AM
    Friday, January 20, 2012 5:12 AM

All replies