必需的元素不包含 wsu:id?

发布于 2024-08-29 15:12:22 字数 560 浏览 4 评论 0原文

我是soapUI 3.5 的新手。我尝试了一些 wsdl 来获取针对部署在 jboss 4.2.1 上的 Web 服务的安全性,

同时在soapUI 上运行测试。它给了我

     <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
     <env:Header/>
     <env:Body>
     <env:Fault>
     <faultcode>env:Server</faultcode>
     <faultstring>org.jboss.ws.core.CommonSOAPFaultException: Required element did not contain a wsu:id.</faultstring>
     </env:Fault>
     </env:Body>
      </env:Envelope>

任何建议?

提前致谢

I am new to soapUI 3.5. I tried some wsdl that acquire security against web service deployed on jboss 4.2.1

while running test on soapUI . It gives me

     <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
     <env:Header/>
     <env:Body>
     <env:Fault>
     <faultcode>env:Server</faultcode>
     <faultstring>org.jboss.ws.core.CommonSOAPFaultException: Required element did not contain a wsu:id.</faultstring>
     </env:Fault>
     </env:Body>
      </env:Envelope>

Any suggestions ?

Thanks in advance

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

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

发布评论

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

评论(3

夜巴黎 2024-09-05 15:12:22

我也有同样的问题。我在 JBoss 论坛 中找到了解决方案

JBoss WS 客户端在中生成 wsu:Id 属性SoapUI 不会自动插入的元素。我的默认 SoapUI 请求如下所示(使用 XML 选项卡查看/编辑):

<soapenv:Header/>
  <soapenv:Body>
    <ser:getCutOffTime/>
  </soapenv:Body>

如果您在请求正文中包含“虚拟”wsu:Id,则可以使用 SoapUI。请务必包含名称空间:

<soapenv:Header/>
  <soapenv:Body wsu:Id="element-1-1272320911598-1522000" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <ser:getCutOffTime/>
  </soapenv:Body>

这为我解决了问题。我用的是JBoss 5.0。

I had the same problem. I found the solution over in the JBoss Forum

JBoss WS clients generate a wsu:Id attribute in the element, which SoapUI will not insert automatically. Here is what my default SoapUI request looks like (view/edit using the XML tab):

<soapenv:Header/>
  <soapenv:Body>
    <ser:getCutOffTime/>
  </soapenv:Body>

You can use SoapUI if you include a 'dummy' wsu:Id in the Body of your request. Be sure to include the namespace:

<soapenv:Header/>
  <soapenv:Body wsu:Id="element-1-1272320911598-1522000" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <ser:getCutOffTime/>
  </soapenv:Body>

This solved the problem for me. I was using JBoss 5.0.

国粹 2024-09-05 15:12:22

我不认为这是安全例外。我相信您的 WSDL 格式错误或与soapUI 测试工具不兼容。其他测试工具或客户端库很可能也会抛出异常。该 WSDL 是自动生成的吗?本来应该是...

I don't believe this is a security exception. I believe your WSDL is malformed or otherwise incompatible with the soapUI testing tool. Its likely that other testing tools or client libraries will also throw exceptions. Was this WSDL auto-generated? It should have been...

呢古 2024-09-05 15:12:22

您遇到的服务器不喜欢您的请求。可能是因为 SoapUI 使用 ? 构建了示例作为占位符,或者可能是“lorem ipsum”值。用有效数据替换那些,它应该可以通过。

如果您有一个应用程序已经可以与此服务器通信,您通常可以将这些请求复制/粘贴到 SoapUI 中。

另外,如果您无法捕获这些示例请求,请在 PC 上运行 Fiddler,它将充当代理,然后它将为您提供一种捕获示例有效负载的简单方法。 SoapUI 也可以做到这一点,但 Fiddler 使它变得非常简单(自动配置您的 WinInet 以将其自身用作代理)。

The server that you ran against didn't like your request. Probably because SoapUI built the sample using ? as placeholders, or perhaps "lorem ipsum" values. Replace those with valid data, and it should go through.

If you have an app that can already talk to this server, you can usually copy/paste those requests into SoapUI.

Also, if you aren't able to capture those sample requests, run Fiddler on a PC, and it'll act as a proxy, and then it'll give you an easy way to capture sample payloads. SoapUI can do it too, but Fiddler makes it really easy (auto-configures your WinInet to use itself as a proxy).

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