方法 xx 和 yy 使用相同的 SOAPAction

发布于 2024-08-08 11:50:45 字数 309 浏览 2 评论 0原文

我们正在尝试为 Web 服务创建一个模拟服务以进行测试。

为此,我们运行 wsdl.exe 创建一个接口,然后基于该接口创建一个 asmx Web 服务。在过去的几年里,我们已经这样做了好几次,没有出现任何问题。

这次我们得到一个错误:

方法 xx 和 yy 使用相同的 SOAPAction

当我们调用 Web 服务时, 。在谷歌上做了一些搜索,它说这是 wsdl.exe 的一个错误。但没有提及如何应对。

有办法解决这个问题吗?我应该删除部分references.cs吗?

谢谢

设拉子

We are trying to create a mock service for a web service for testing purposes.

To do this we run wsdl.exe to create an interface and then create an asmx web service based on that interface. We have done this several times over the last years without any problems.

This time we get an error:

The methods xx and yy use the same SOAPAction

When we call the web service. Have done some searching on google, it says that this is a bug with wsdl.exe. But says nothing about what to do about it.

Is there a way to fix this? Should I just delete parts of references.cs?

Thanks

Shiraz

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

孤君无依 2024-08-15 11:50:45

找到了解决方案。将以下行作为属性添加到 Web 服务类中:

[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

经过干净的解决方案和重建后,一切正常。

Found the solution. Added the following line as an attribute to the web service class:

[SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]

After a clean solution and a rebuild, everything worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文