I'm seeing a very strange issue with a .NET webservice being consumed by Flex.
I have a very simple class with nothing other than properties with [XmlAttribute('xxx')] attributes.
public class OrderAddress
{
public OrderAddress() {}
[XmlAttribute("firstName")]
public string FirstName { get; set; }
[XmlAttribute("lastName")]
public string LastName { get; set; }
[XmlAttribute("company")]
public string Company { get; set; }
[XmlAttribute("address1")]
public string Address1 { get; set; }
... (more properties)
}
The problem is that in Flex when this object is deserialized EVERY SINGLE fields is null in the debugger. The instance of the OrderAddress class is not null, just all the fields. I an 100% sure my web service proxy layer is up to date and there is 100% definitely data going across the wire as shown by Fiddler.
The very very wierd thing is that if I change one of these properties to serialize as an element (as opposed to XmlAttribute) and recompile ONLY my C# webservice then the data instantly can be recognized by Flex. If I add a completely unused field - like public string Foo = "foo";
then that also suddenly works.
I kind of remember seeing something like this before but don't remeber if I successfully fixed it or not.
Its 3:30am for me and I need to postpone my hardcore troubleshooting, but throwing this out here in case its obvious to anyone reading. The code is in a module, which I know can sometimes cause some wierdness - but this seems to be very wierd.