我正在尝试使用 gSoap 连接到使用 https 保护的网络服务。但是,当我使用 https url 运行 wsdl2h 时,它会抛出以下错误:
Cannot connect to https site: no SSL support, please rebuild wsdl2h with SSL or download the files and rerun wsdl2h
我在 Fedora Core 14 上构建。我已经使用 yum 安装了 openssl-devel 和 zlib-devel。我错过了什么?
最佳答案
默认情况下,wsdl2h 是在不支持 SSL 的情况下构建的。 gsoap 分发的 wsdl 代码文件夹中的 README.txt 文件包含以下内容:
USING SSL FOR HTTPS TRANSFER OF WSDL FILES
You must build the WSDL parser with 'make secure' to build an SSL-enabled version of wsdl2h that can access HTTPS secure sites.
If you don't have OpenSSL installed, you cannot build an SSL-secure version of wsdl2h. In that case we recommend downloading the WSDL and schema files for processing with the non-SSL-enabled wsdl2h tool.
因此,您需要手动下载 .wsdl 文件并在其上运行现有的 wsdl2h,或者使用 make secure 重建 wsdl2h,以便它知道包含 SSL 库和对 https 的支持。
关于linux - wsdl2h 无法连接到 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8160083/