我有一个返回XmlDocument的WebMethod:
[WebMethod(Description =
"Bla, bla"
), SoapDocumentMethod(ResponseElementName = "TestResponse")]
public XmlDocument Service1(XmlDocument MsgIn)
{
XmlDocument xmlDocument = new XmlDocument();
...
return xmlDocument;
}
我收到了这个回复:
<s:element name="TestResponse">
<s:complexType>
<s:sequence>
<s:element name="Service1Result">
<s:complexType mixed="true">
<s:choice maxOccurs="unbounded" minOccurs="0">
<s:any processContents="lax"/>
</s:choice>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
如何将Service1Result名称更改为其他特定名称。
由于
答案 0 :(得分:2)
解决了这行代码:
[return:System.Xml.Serialization.XmlElementAttribute(&#34; MySpecificMethodName&#34;)]
public S050ResponseMensSalida S050(XmlDocument MsgIn) { ... }