I have an xml schema with a type defined like this:
<xs:complexType name="InteractiveWorkflowAddress">
<xs:sequence>
<xs:element name="endpointAddresses" nillable="true" type="q1:ArrayOfstring" xmlns:q1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
<xs:element name="instanceId" type="ser:guid" />
</xs:sequence>
</xs:complexType>
where the ArrayOfstring type is defined as
<xs:complexType name="ArrayOfstring">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:element name="ArrayOfstring" nillable="true" type="tns:ArrayOfstring" />
How can I deserialize the InteractiveWorkflowAddress
type using the DataContract attribute? I tried the following
[DataContract(Namespace = Constants.Namespace)]
public class InteractiveWorkflowAddress {
[DataMember()]
public string[] EndpointAddresses;
[DataMember()]
public string InstanceId;
}
But while the InstanceId
member is deserialized correctly, EndpointAddresses
is always null.