在 Flex 4 中使用 HTTPS Web 服务 [英] Consuming HTTPS Webservice in Flex 4

查看:27
本文介绍了在 Flex 4 中使用 HTTPS Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Adob​​e Flash Builder 中使用一项 HTTPS 网络服务.

I'm trying to consume one HTTPS webservice in Adobe Flash Builder.

当我添加 URL 时出现此错误:

when I add the URL I get this error:

服务过程中出现错误内省.WSDL 异常:faultCode=OTHER_ERROR:无法解析导入的文档在'https://172.21.17.235:9443/testehttpsWeb/sca/testeIOExport1/WEB-INF/wsdl/testehttps_testeIOExport1.wsdl'.:javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX 路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:找不到有效的证明请求目标的路径

There was an error during service introspection. WSDLException: faultCode=OTHER_ERROR: Unable to resolve imported document at 'https://172.21.17.235:9443/testehttpsWeb/sca/testeIOExport1/WEB-INF/wsdl/testehttps_testeIOExport1.wsdl'.: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

如何配置我的客户端以使用 Web 服务?

How can I configure my client to consume the Webservice?

推荐答案

我们将不得不向发现这个问题的人买冰淇淋!

We will have to buy ice cream to the person that figured this out!

解决方案是不将证书导入 JKS 信任库,而是导入 cacarets 文件,就我而言:

The solution was to import the certificate not to a JKS truststore, but to the cacarets file, in my case:

keytool -import -alias trust1 -keystore "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\jre\lib\security\cacerts" -file c:\somepath\mycert.cer

在这种情况下,不需要添加:

In this case there is no need to add the:

-Djavax.net.ssl.trustStore="c:\somepath\truststore.jks"

...FlashBuilder.ini 上的行

...line on FlashBuilder.ini

一个导入的注意事项是 DNS 服务器必须能够通过名称而不是 IP 来转换 Web 服务路径,因为在安装的证书中 CN 提到了 Web 服务服务器名称而不是它的 IP

An imported note is that the DNS Server must be able to translate the Web Service path by name instead of by IP, because in the installed certificate the CN mentions the Web Service server name not it's IP

问候

这篇关于在 Flex 4 中使用 HTTPS Web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆