2013-02-04 218 views
2

我有一個在.NET 4.5中編寫的WCF Web服務,它工作正常。WCF服務wsdl客戶端錯誤

我用來調用它的客戶端(SQL CLR存儲過程)必須使用.NET 2,因爲它用於Sql Server(2005)。

當我使用內置的WCF測試客戶端測試Web服務時,一切正常。同樣,如果我使用svcutil.exe構建使用.NET 3 +的客戶端,它也可以工作。

但是,由於我必須使用.NET 2,我發現唯一的解決方案是使用wsdl.exe生成客戶端(original question) - 它成功地完成了這個任務,但我沒有設法使其工作。

我得到的錯誤The message with Action 'action removed' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver. Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).

我發現this question,但它建議尋找到這我不使用,因爲我在.NET 2.0中EndpointDispatcher類。

據我所知,我的所有命名空間都是一樣的 - 但仍然沒有運氣。我也嘗試使用服務跟蹤實用程序,但它似乎沒有顯示任何有用的東西。

甚至有可能以這種方式使用這種方式提供服務的客戶端嗎?或者端點永久不兼容?

回答

1

我最終用wsdl重新創建了我的客戶端,因爲我改變了一些東西,事實證明我有。客戶端更新了我的命名空間,並從這一點開始工作。