我可以将我的 Web 服务客户端与我的 Web 服务 (NetBeans) 放在同一个项目中吗
是否可以让我的 Web 服务客户端与我的 Web 服务位于同一项目中?
当我尝试构建项目时,NetBeans 找不到对 WSDL 的引用,因为它尚未部署。
这样做的批准方法是什么?
沃夫加Pro
Is it possible to have my webservice client in the same project as my webservice?
When I try and build the project, NetBeans cant find a reference to the WSDL as it is not deployed.
What is the approved way of doing this?
WulfgarPro
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我明白了这一点。
只需要在 web/WEB-INF/wsdl/mywsdlfile.wsdl 中添加 Web 服务的最终 url,其中规定:
这样做,然后清理构建和部署,解决了我的所有问题。现在我的服务和客户端都在同一个项目中运行。
我不喜欢 NetBeans 有这么多属性/配置文件。在我看来,NetBeans 试图做的事情太多了。
沃夫加Pro
I figured this out.
Just needed to add the eventual url of the web-service in web/WEB-INF/wsdl/mywsdlfile.wsdl where it stipulates:
<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
Doing this, then clean-build and deploy, fixed all my problems. Now I have both my service and client running in the same project.
I'm not liking that NetBeans has so many property/configuration files. Seems to me that NetBeans is trying to do too much.
WulfgarPro
当前不可能在由 NetBeans 创建的同一个基于 ant 的 NetBeans 项目中拥有服务及其客户端。您可能可以破解 build.xml 来使其成为可能......但我不知道使其成为可能所需的破解细节。
It is not currently possible to have a service and its client in the same ant based NetBeans project as created by NetBeans. You could probably hack the build.xml to make it possible... but I do not know the details of the hacking necessary to make it possible.