Jax-ws定制生成的WSDL

发布于 2024-12-22 09:11:37 字数 320 浏览 2 评论 0原文

由于soap:address 错误,我需要更改 JAX-WS 生成 WSDL(由于应用程序服务器的 WebService 重新映射,contextRoot 不正确)。 我阅读了有关 WSDLGeneratorExtension 系统的信息,但我无法使用它,我在 /META-INF/services 下放置了一个 com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension 文件,其中包含我的实现的现场类名,但它从未被调用过。

我怎样才能让它发挥作用?或者我可以采用另一种方法来纠正生成的 WSDL 的soap:address 位置吗?

谢谢你!

I need to change the JAX-WS generat WSDL because of a soap:address error (contextRoot it is not correct due to a WebService remapping of the Application Server).
I Read about the WSDLGeneratorExtension system but I can not use it, i placed a com.sun.xml.ws.api.wsdl.writer.WSDLGeneratorExtension file under /META-INF/services with insite de class name of my implementation, but it is never called.

How can i let it work? Or Can i follow another way to corret the soap:address location of the generated WSDL?

Thank you!

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

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

发布评论

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

评论(1

晨光如昨 2024-12-29 09:11:37

通常的做法是不使用(甚至包括)实际的服务 URL 到 WSDL 中(除非它是某种应该“众所周知”的公共服务)。例如,原因是运行相同服务的不同环境将具有不同的 URL。

作为 WS 客户端初始化的一部分,您可以提供不同的 URL(通常来自某种配置文件)。因此,您也许不应该考虑在 WSDL 中修复 URL,而应该在客户端初始化中传递正确的 URL。

Usual practice is not to use (or even include) actual service URL into WSDL (unless it's some sort of public service which is supposed to be 'well known'). Reasons being that different environments running the same service would have different URLs, for example.

As part of WS client initialization you could provide different URL (usually from some sort of config file). So you perhaps should not think in terms of fixing URL in WSDL but instead pass proper URL in your client initialization.

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