Using VS 2013.
We are consuming some wsdl by Web Reference and getting all the classes of the ws.
We set value to the ws hierarchy attribute but the attribute is not serialized.
I saw here that one of the couses of attribute not getting serialized is:
"it has a public bool FooSpecified {get;set;} property or field that returned false."
So if we set the hierarchy attribute it's not represented in the XML:
familyInformation = new amadeus.Fare_SellByFareSearchFareFamiliesFamilyInformation
{
fareFamilyname = "XXXX",
hierarchy = 2
}
public decimal hierarchy {
get {
return this.hierarchyField;
}
set {
this.hierarchyField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlIgnoreAttribute()]
public bool hierarchySpecified {
get {
return this.hierarchyFieldSpecified;
}
set {
this.hierarchyFieldSpecified = value;
}
}
<familyInformation>
<fareFamilyname>XXXX</fareFamilyname>
</familyInformation>
Please help how to get the hierarchy attribute serialized