[英]How to generate a web service client in Eclipse from a wsdl at an https address?
I can generate a client from 我可以从中生成一个客户端
http://localhost:8080/service?wsdl
just fine, but now I want to generate a client from 很好,但现在我想从中生成一个客户端
https://localhost:8081/service?wsdl
and Eclipse says the location is invalid, and when Eclipse makes the attempt my Jetty server says Eclipse说这个位置是无效的,当Eclipse尝试我的Jetty服务器时说
javax.net.ssl.SSLException: Received fatal alert: certificate_unknown javax.net.ssl.SSLException:收到致命警报:certificate_unknown
I can easily navigate to the wsdl in my browser after confirming the security exception, so it's definitely there. 确认安全异常后,我可以在浏览器中轻松导航到wsdl,所以它肯定存在。
I've tried downloading the wsdl to my local file system, but I still can't generate it from there because the wsdl contains a reference to other https locations, eg. 我已经尝试将wsdl下载到我的本地文件系统,但我仍然无法从那里生成它因为wsdl包含对其他https位置的引用,例如。
<xsd:import namespace="http://my.service.namespace/" schemaLocation="https://localhost:8081/serviceSchema?xsd=1"/>
I've modified eclipse.ini to contain the following lines: 我修改了eclipse.ini以包含以下行:
-Djavax.net.ssl.trustStore="/path/to/my/truststore/.keystore"
-Djavax.net.ssl.trustStorePassword="mytruststorepassword"
-Djavax.net.ssl.keyStore="/path/to/my/keystore/.keystore"
-Djavax.net.ssl.keyStorePassword="mykeystorepassword"
to no avail. 无济于事。 Eclipse does not appear to have any preference settings related to this either.
Eclipse似乎没有任何与此相关的首选项设置。 Is there any way to do this through eclipse, or will I have to use some external tool?
有没有办法通过eclipse做到这一点,还是我必须使用一些外部工具?
EDIT: For others with the same issue, here's how I solved it. 编辑:对于有同样问题的其他人,这是我如何解决它。
Open the dependency you just downloaded with a browser and copy its new location, eg. 使用浏览器打开刚下载的依赖项并复制其新位置,例如。
file:///path/to/my/schema/service.xsd 文件:///path/to/my/schema/service.xsd
将wsdl保存到本地文件系统并从那里生成,它似乎是Eclipse中的一个错误,请检查此链接。
I had the same problem and the link from the accepted answer does not work for me, but i generated the service using the following steps: 我有同样的问题,接受的答案中的链接对我不起作用,但我使用以下步骤生成服务:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.