Jax-ws定制生成的WSDL
由于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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常的做法是不使用(甚至包括)实际的服务 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.