Hey guys,
i have a problem with the serialization of an array during a SOAP request:
The interesting part of the incoming Message looks like this:
<wait4get> <userName>test</userName> <passWord>test</passWord> <watchdog> <clientId>test</clientId> <timeOut>30</timeOut> </watchdog> <get> <userName>test</userName> <passWord>test</passWord> <watchdog/> <objectType>TestData</objectType> <filterList> <filter> <identifier> <ident>testident</ident> </identifier> </filter> </filterList> <position>11</position> </get> </wait4get>
The class of my source code looks like this:
public class wait4GetType : headerRequest { [XmlElement("get")] public getType[] get { get; set; } [XmlAttribute] public int maxWaitTime { get; set; } [XmlIgnore] public bool maxWaitTimeSpecified { get; set; } public override string AddToString(int indent) { var s = base.AddToString(indent); indent++; AddToString(indent, ref s, "get", get); AddToString(indent, ref s, "maxWaitTime", maxWaitTime); AddToString(indent, ref s, "maxWaitTimeSpecified", maxWaitTimeSpecified); return s; } }
The problem is that my process expects an extra node <getType> like in the following example:
<get>
<getType>
.....
</getType>
Without this extra node, the element <get> is an empty array after the serialization.
How can i change this behaviour?
Best Regards