WSDL 策略对外部文件的引用

发布于 2024-08-07 17:44:12 字数 439 浏览 8 评论 0原文

当我尝试部署使用 CXF 的 wsdl2java 生成的 Web 服务以从 WSDL 文件生成 Java 代码时,出现一些错误。当我尝试规范化 PolicyReference 时,我成功地追踪到 Apache Neethi 抛出的 NullPointerException 错误。策略引用在外部 XML 文件中定义(许多 WSDL 引用此策略文件)。以下是我在 WSDL 中看到的内容:

<wsp:PolicyReference URI="policy:someExternalFile.xml#PolicyName" />

我尝试删除 URI 开头的“policy:”方案并一起删除 URI 方案。

如果我将该策略移至 WSDL,一切都会正常进行。我使用的是 CXF 2.2.3 和 Tomcat 6。此版本中包含的 Apache Neethi 版本是 2.0.4。

I'm getting some errors when I try to deploy a web service generated using CXF's wsdl2java to generate the Java code from a WSDL file. I've managed to trace the error down to a NullPointerException being thrown by Apache Neethi when I tries to normalize a PolicyReference. The policy reference is defined in an external XML file (a lot of WSDLs reference this policy file). Here is what I see in the WSDL:

<wsp:PolicyReference URI="policy:someExternalFile.xml#PolicyName" />

I've tried removing the "policy:" scheme at the start of URI and getting rid of the URI scheme all together.

If I move the policy into the WSDL, things work fine. I'm using CXF 2.2.3 and Tomcat 6. The version of Apache Neethi that is included with this release is 2.0.4.

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

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

发布评论

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

评论(1

月依秋水 2024-08-14 17:44:12

您有机会使用 CXF 记录错误并附加显示问题的示例 wsdl/policy 吗?这可能是一个 neethi 问题错误,也可能是 CXF 策略加载机制中的错误。拥有测试用例对于诊断这一点非常有用。

Any chance you can log a bug with CXF and attach a sample wsdl/policy that shows the issue? It MAY be a neethi issue bug it could also be a bug in the CXF policy loading mechanisms. Having a test case is quite useful for diagnosing this.

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