Java Spring WS 和 SSLHandshakeException
我正在尝试调用意大利网络服务,但遇到 SSLHandshakeException
异常。我知道这是一个安全信任问题,我应该有一个证书来允许我使用 SSL 进行通信。我想知道是否有人可以帮助我了解接下来的步骤以及如何生成有效的证书来与网络服务进行通信。安全不是我的海滩:)
意大利网络服务有一个 zip 文件夹,里面有一个供开发人员使用的工具,他们有两个证书,但我不知道应该用它们做什么。您可以在这里看到:https://sistemats1.sanita.finanze.it/portale/spese-sanitarie/documenti-e-specifiche-tecniche-strumenti-per-lo-sviluppo
您可以在这里看到我的实验代码:<一个href="https://github.com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java" rel="nofollow noreferrer">https://github.com/src/main/java/com/github/STSClient.java" com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java,请随意克隆并尝试。
注意:在开发工具包中,他们有一个肥皂项目,我不需要任何东西就可以调用网络服务。
STS测试环境:https://invioSS730pTest.sanita.finanze.it/DocumentoSpesa730pWeb/DocumentoSpesa730pPort
谢谢,
祝您代码愉快:)
I'm trying to call an Italian webservice, but I'm getting an SSLHandshakeException
exception. I know this is a security trust problem and I should have a certificate to allow me to communicate using SSL. I would like to know if someone can help me to understand what should be the next steps and how can I generate a valid certificate to communicate with the webservice. Security is not my beach :)
The Italian webservice has a zip folder with a tool for developers and they have there two certificates, but I don't know what I should do with them. YOu can see here: https://sistemats1.sanita.finanze.it/portale/spese-sanitarie/documenti-e-specifiche-tecniche-strumenti-per-lo-sviluppo
Link to the Zip file: (https://sistemats1.sanita.finanze.it/portale/documents/20182/34450/kit730P_ver_20210301.zip/027086e7-385a-6071-ca86-f52077923a85)
You can see my experimental code here: https://github.com/nbentoneves/ws-spring-sts/blob/main/src/main/java/com/github/STSClient.java, feel free to clone and try it.
Note: In the development kit they have a soap project and I was able to call the webservice without needing anything.
STS Test Environment: https://invioSS730pTest.sanita.finanze.it/DocumentoSpesa730pWeb/DocumentoSpesa730pPort
Thanks,
Have a nice code time :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要创建一个信任管理器,它不像默认的那样验证证书链。
检查一下:
(如何解决 javax.net.ssl.SSLHandshakeException 错误?)
You need to create a Trust Manager which does not validate certificate chains like the default ones.
Check this:
(How to solve javax.net.ssl.SSLHandshakeException Error?)