简体   繁体   English

从HTTPS URL生成Java Web服务客户端

[英]Generate Java Web Service Client from HTTPS url

I'm implementing a test client for a web service. 我正在为Web服务实现一个测试客户端。 The service use HTTPS and I'm trying to use the Eclipse wizard to generate the client. 该服务使用HTTPS,我正在尝试使用Eclipse向导生成客户端。

Using this url Eclipse cannot find the WSDL definition: The wizard alerts that "The service definition selected is invalid." 使用此URL Eclipse无法找到WSDL定义:向导会警告“所选的服务定义无效”。 and the process cannot go ahead. 而这个过程无法进行。

The url is correct, I verified it implementing a .NET client and it works. 网址是正确的,我验证它实现了一个.NET客户端,它的工作原理。 The only issue is that the SSL certificate is expired. 唯一的问题是SSL证书已过期。

How can I generate the client correctly in java? 如何在java中正确生成客户端?

Capture the WSDL by other means, like download it with your browser and then access it locally with a non-SSL server (or even just a file). 通过其他方式捕获WSDL,例如使用浏览器下载它,然后使用非SSL服务器(甚至只是文件)在本地访问它。 It looks like Eclipse can't deal with an SSL problem (which is likely a bug on their part, they should have an option to ignore it). 看起来Eclipse无法解决SSL问题(这可能是他们的错误,他们应该有一个忽略它的选项)。

You shouldn't need to. 你不应该这样做。 There is no difference in the WSDL between using the SOAP call on HTTP and using the SOAP call with SSL (HTTPS). 在HTTP上使用SOAP调用和使用SOAP调用SSL(HTTPS)之间的WSDL没有区别。

Please change the https to http 请将https更改为http

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM