1
默認情況下,Web服務調用是同步還是異步?如何通過服務或客戶確定同步性?Web服務調用的同步性
我有類似下面的代碼:
try
{
string result = MakeWebServiceCall_1(); // this is a third party webservice
MakeWebServiceCall_2(result); // another webservice which must happen *after* the first one is complete
}
catch()
{
SetStatus(Status.Error); // this calls my own stored procedure
throw;
}
SetStatus(Status.Sucess);
在上面,SetStatus
被寫入到從讀取第三方Web服務相同的表。如果我在兩個Web服務調用完成之前都改變了狀態,它將會變得非常混亂,我會被解僱。我如何知道/確保Web服務調用是同步的?
+1知道如何使用谷歌/冰/等) – TheGeekYouNeed 2010-07-29 09:06:18
@Geek如果這應該是我冷嘲熱諷,嘗試谷歌搜索「如何同步調用Web服務」,並看到所有的結果如何無用的。我從來沒有發佈任何東西,沒有花費很多時間試圖自己搞清楚。 – fearofawhackplanet 2010-07-29 10:08:20