“WebService 注释不存在”例外

发布于 2024-12-11 01:15:15 字数 346 浏览 0 评论 0原文

我正在尝试调用网络服务。我使用 wsimport 创建基于 WSDL 的存根类。我创建了一个小型控制台应用程序来在 Eclipse 中测试它们,并且该应用程序工作正常。然后,我将这些类移至我正在使用的 CMS 中(Day CQ 5.3),相应地修改了包名称,并创建了一个小型 JSP 页面来测试它们。当我尝试查看该页面时,收到一条错误消息“类 package.name.ProductsSoap 上不存在 WebService 注释”。

但是,1)ProductsSoap 是一个接口,而不是一个类。 2)ProductsSoap确实有一个WebService注释。 3) 没有生成实现ProductsSoap 接口的类。

什么会导致这种情况呢?

I'm trying to call a web service. I used wsimport to create stub classes based on the WSDL. I created a small console app to test them in Eclipse, and this apps works correctly. I then moved these classes into a CMS I'm using (Day CQ 5.3), modified the package name accordingly, and created a small JSP page to test them. When I attempt to view the page, I get an error that says "A WebService annotation is not present on class package.name.ProductsSoap".

However, 1) ProductsSoap is an interface, not a class. 2) ProductsSoap does indeed have a WebService annotation. 3) There were no generated classes that implement the ProductsSoap interface.

What would cause this?

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

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

发布评论

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

评论(1

白芷 2024-12-18 01:15:15

您使用 Spring 框架来使用您的 Web 服务吗?您的类路径中应该有 spring-ws-corespring-ws-core-tiger

Do you use spring framework to consume your web service? You should have spring-ws-core and spring-ws-core-tiger in your classpath.

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