Код: Выделить всё
[OperationContract]
[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "movex/anp_prd")]
Producer Test2();
Код: Выделить всё
public class Producer
{
[XmlAttribute]
public int Test { get; set; }
[XmlElement]
public string ProducerFound { get; set; }
}
Код: Выделить всё
public Producer Test2()
{
return new Producer
{
Test = 999,
ProducerFound = "Yes"
};
}
Код: Выделить всё
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
Yes
999
Подробнее здесь: https://stackoverflow.com/questions/793 ... attributes
Мобильная версия