2013-02-04 222 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重新创建了我的客户端,因为我改变了一些东西,事实证明我有。客户端更新了我的命名空间,并从这一点开始工作。