I am trying to have an optional boolean element in my webservice, i am
attempting to use the Specified flag method to determine if the element was
transmitted in the soap body but it just wont transmit it.
this is what the webservice cs looks like:
public bool OptionalBool;
[XmlIgnore]
public bool OptionalBoolSpecified;
and the WSDL generates as i would expect it to:
<s:element minOccurs="0" maxOccurs="1" name="OptionalBool"
type="s:boolean" />
and if i go from the wsdl to cs it generates as i would expect also.
but then when i set q.OptionalBool = true; or = false, it still is not
transmitted. If i manually set q.OptionalBoolSpecified = true; then it
transmits the OptionalBool field. I thought the purpose of the xxxSpecified
was to only serialize if the element is present??
Any help would be appreciated, thanks.