真的很簡單的問題。從C#中的Web服務存儲XML#
我正在向C#中的Web服務發送數據,並將其返回給我。它是一個SOAP 1.1和/或1.2 Web服務。我不知道如何正確接收這些數據,然後獲取我需要的信息。
這裏是我的代碼,將它
try
{
_webService.ProcessCard(sVariable1, sVariable2);
}
catch (Exception d)
{
}
而且這裏是我回來,如果我手工通過瀏覽器
<Response>
<Result>24</Result>
<RespMSG>Invalid</RespMSG>
<ExtData>More Data</ExtData>
</Response>
這裏使用該服務的服務定義:
public Response ProcessCard(string sVariable1, string sVariable2) {
object[] results = this.Invoke("ProcessCard", new object[] {
sVariable1,
sVariable2});
return ((Response)(results[0]));
}
你有什麼打算與所得到的數據做線的東西? – HackedByChinese 2009-11-25 17:13:34
ProcessCard的退貨是什麼?您的Web服務是否爲SOAP Web服務?休息?其他東西WCF?是否有_webService實例的其他成員?我們能否看到類定義,至少在方法和屬性方面? – Dathan 2009-11-25 17:14:41
爲OP和其他評論添加了更多信息。 – 2009-11-25 18:04:01