1
如何在ASP.NET Web服務中控制參數類型標記?我得到< xml>字符串</xml>在一個web應用程序和<數據>字符串< /數據>在其他...有沒有辦法控制這個?ASP.NET Web服務參數類型
[WebMethod]
public bool TestFunction(string xml)
{
//DO SOMETHING
return true;
}
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<TestFunction xmlns="http://tempuri.org/">
<xml>string</xml> //<data>string</data>
</TestFunction>
</soap:Body>
</soap:Envelope>
編輯:我忘了使用您指定的參數名稱重命名功能
是的,這是一個參數名稱,我認爲它與傳輸數據類型有關,因爲名稱。 – redman