我需要为body元素添加一个属性。我怎么能这样做?
<soapenv:Body wsu:Id="body">
我正在使用XmlSerializerFormat。我的代码:
f[ServiceContract(Namespace = "http://TSUtoMFC")]
[XmlSerializerFormat]
public interface IService
{
[XmlSerializerFormat]
[OperationContract]
ResponseType SampleTestSmev();
}
[MessageContract]
[XmlSerializerFormat]
public class ResponseType
{
[MessageHeader]
public SecurityType Security = new SecurityType();
[MessageHeader]
public smevheader header = new smevheader();
[MessageBodyMember(Namespace = "http://smev.gosuslugi.ru/rev120315")]
public MessageType Message = new MessageType();
[MessageBodyMember(Namespace = "http://smev.gosuslugi.ru/rev120315")]
public MessageDataType MessageData = new MessageDataType();
}