SOAP 消息大小是否大于允许的限制 [SECURITY.MSGSIZE v 1.0]?如何?

发布于 2024-08-18 23:22:46 字数 539 浏览 4 评论 0原文

我正在尝试帮助一位同事运行 SOATest (一个用于测试 SOAP 服务的 Web 服务客户端简单)在 WCF Web 服务操作上,对于“大”响应,我们看到此错误:

SOAP Message size it greater than allowed limit [SECURITY.MSGSIZE v 1.0]

这很令人困惑,因为该工具实际上能够从不包含 SOAP 错误的服务器获取响应。此外,响应并不是很大——准确地说是 22kb。我似乎无法在谷歌上搜索此错误消息,并且其中的语法/拼写错误也对我没有好处。

这是 SOATest 设置吗?也许是 WCF 设置?或者 WS-Security 设置?这当然不是我们在服务器级别施加的限制。

这是供后代使用的屏幕截图

I'm trying to help a colleague run SOATest (a web services client that makes testing SOAP services easy) on a WCF web service operation, and for "big" responses, we are seeing this error:

SOAP Message size it greater than allowed limit [SECURITY.MSGSIZE v 1.0]

This is perplexing, as the tool is actually able to get a response from the server that contains no SOAP faults. Furthermore, the response isn't very big at all - 22kb to be exact. I can't seem to Google this error message, and the the grammar/spelling mistake in it isn't working for my benefit either.

Is this a SOATest setting? Maybe a WCF setting? Or a WS-Security setting? It certainly isn't a restriction we are imposing at the server level.

Here's a screenshot for posterity.

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

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

发布评论

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

评论(1

爱要勇敢去追 2024-08-25 23:22:46

我们能够在 SOATest 论坛 上找到此错误的答案。

SECURITY.MSGSIZE 是可添加到响应的默认 SOAP 策略规则检查之一。以下是应用特定规则的屏幕截图。此特定规则位于:

C:\Program Files\Parasoft\SOAtest\5.5.3\rules\SOAP\SECURITY.MSGSIZE.rule

如果您打开位于以下位置的默认策略配置包:

C:\Program Files\Parasoft\SOAtest\5.5.3\rules\soa.policy

您可以通过右键单击 SOAP-> 避免大型 SOAP 消息 [SECURITY.MSGSIZE] 来禁用或修改 SECURITY.MSGSIZE 规则的值]->编辑->方法:

def checkSize(value, context):
    message = XMLUtil.serialize(value)
    size = len(message)
    if size > 10240:
        return 1
    else:
        return 0

尺寸> 10240 条件是可以根据需要更改此规则的位置。或者,您可以简单地将其作为默认策略包的一部分取消选中,然后以这种方式保存更改。

We were able to get an answer to this error on the SOATest forums.

SECURITY.MSGSIZE is one of the default SOAP Policy rule checks available to be added to a response. Here's a screenshot of the particular rule as it was being applied. This particular rule is located at:

C:\Program Files\Parasoft\SOAtest\5.5.3\rules\SOAP\SECURITY.MSGSIZE.rule

If you open the default policy configuration package located at:

C:\Program Files\Parasoft\SOAtest\5.5.3\rules\soa.policy

you can then disable or modify the value of the SECURITY.MSGSIZE rule by if you right click on SOAP->Avoid large SOAP messages [SECURITY.MSGSIZE]->Edit->Method:

def checkSize(value, context):
    message = XMLUtil.serialize(value)
    size = len(message)
    if size > 10240:
        return 1
    else:
        return 0

The size > 10240 conditional is where this rule can be changed as needed. Or you could simply uncheck it as part of the default policy package and save the change that way instead.

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