WCF服务wsdl客户端错误

3

我有一个用.NET 4.5编写的WCF Web服务,它运行良好。

我使用的客户端(SQL CLR存储过程)必须使用.NET 2,因为它是针对Sql Server(2005)的。

当我使用内置的WCF测试客户端测试Web服务时,一切正常。同样,如果我使用svcutil.exe构建一个使用.NET 3+的客户端,它也可以工作。

然而,由于我必须使用.NET 2,我找到的唯一解决方案是使用wsdl.exe生成客户端(原始问题),它成功地完成了,但我没有设法让它工作。

我收到错误消息: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).

我发现这个问题,但它建议查看EndpointDispatcher类,而我没有使用该类,因为我正在使用.NET 2.0。

据我所知,所有的命名空间都是相同的,但仍然没有运气。我还尝试使用服务跟踪实用程序,但它似乎没有显示任何有用的信息。

使用这种方式制作的客户端是否可以与该服务一起使用?还是这些端点永远不兼容?

1个回答

1

我最后决定重新生成wsdl客户端,希望能发现我更改了什么,结果我真的改了。客户端更新了我的命名空间,从那时起一切都正常了。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接