且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

消息或具有 MessageContractAttribute 和其他不同类型参数的类型

更新时间:2021-07-30 22:53:42

不,这意味着您在方法上有多个参数,其中一些不是消息.尝试将接口发布到您的服务.

No, it means that you have multiple parameters on the method and some of them are not messages. Try posting the interface to your service.

这篇博文 解释:

... 问题是消息契约不能与其他参数类型同时使用.在这种情况下,操作的返回值是一个字符串.返回值只是另一个输出参数,因此此操作将消息合同消息与原始参数类型混合.这会失败,因为消息契约让您可以控制 SOAP 消息的布局,从而防止系统融入这些附加参数.

... problem is that message contracts cannot be used at the same time as other parameter types. In this case, the return value of the operation is a string. Return values are just another output parameter, so this operation is mixing a message contract message with a primitive parameter type. This fails because message contracts give you control of the layout of the SOAP message, preventing the system from melding in these additional parameters.

重要提示:

顺便说一下,当您尝试混合消息契约时,您得到的错误消息如下所示.

By the way, the error message you get when you try to mix message contracts looks like this.