Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/302.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何与WCF服务(wsHttpBinding)通信&;.NET2.0客户端_C#_Wcf_Web Services_.net 2.0 - Fatal编程技术网

C# 如何与WCF服务(wsHttpBinding)通信&;.NET2.0客户端

C# 如何与WCF服务(wsHttpBinding)通信&;.NET2.0客户端,c#,wcf,web-services,.net-2.0,C#,Wcf,Web Services,.net 2.0,我对合作伙伴提供的Web服务有问题(我无法修改此服务) 我必须使用带有.NET 2.0客户端的WS-*web服务(wsHttpBinding)。我有以下例外: SOAP header Action was not understood. 我知道用.NET2.0与WS-with进行通信是不可能的。我认为可以使用WSE与WS-通信 我这样做了,但我总是犯同样的错误: 未理解SOAP标头操作 是否可以解决此问题以与此服务通信?通常使用.NET 2.0应用程序的WCF服务会更改接口,添加布尔输出参数

我对合作伙伴提供的Web服务有问题(我无法修改此服务)

我必须使用带有.NET 2.0客户端的WS-*web服务(wsHttpBinding)。我有以下例外:

SOAP header Action was not understood.
我知道用.NET2.0与WS-with进行通信是不可能的。我认为可以使用WSE与WS-通信

我这样做了,但我总是犯同样的错误:

未理解SOAP标头操作


是否可以解决此问题以与此服务通信?

通常使用.NET 2.0应用程序的WCF服务会更改接口,添加布尔输出参数(成功指示器),将每个方法的返回类型更改为out参数,将返回类型更改为void。

您可能希望使用basicHttpBinding使其与.NET 2.0客户端一起工作。该绑定已经提供了旧客户端或其他平台所需的兼容性。如果您仍然决定使用wsHttpBinding,则必须使用Microsoft WSE在.NET 2.0客户端中创建与wsHttpBinding兼容的消息。

如果您可以控制该服务,则正如Pablo在下面所说,只需使用
basicHttpBinding
添加端点即可。如果你没有控制权,那么你应该尽一切努力避免使用WSE——它已经过时,不受支持。将.NET 4.0添加到.NET 2.0系统(除非系统运行的是Windows Server 2000或其他不受支持的操作系统)将是一个更好的选择。不,我无法控制该服务:(