Possible Duplicate:
web service request call SOAP request missing empty parameters
I’m trying to call a webservice hosted by a third party. The XSD they’ve provided me with defines an element:
<xsd:element name="ElementName" type="String"/>
They have given me instructions that this element must not be populated but it must be included as an empty tag in the XML request
<ElementName />
I used wscf to generate an object from the schema and ElementName came out like this:
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(ElementName="ElementName")]
public string ElementName;
My problem is that when I generate XML request the tag is excluded in the generated XML rather than being an empty tag.
Is there perhaps some attribute I can add to the element to ensure that it gets sent through empty? How can I ensure it’s included?
Thanks
Try to assign the ElementName an empty string: