Spring integration Spring集成WS出站网关SSL
我们有一个外部soap服务,下面的工作原理如下Spring integration Spring集成WS出站网关SSL,spring-integration,Spring Integration,我们有一个外部soap服务,下面的工作原理如下 <bean id="WSACallbackKlen" class="nbr.ei.util.LctionCallback"> <constructor-arg index="0" value="http://serviations.bnst.n/toezicht/ka/km/KkService/tnRequest"></constructor-arg> <constructo
<bean id="WSACallbackKlen" class="nbr.ei.util.LctionCallback">
<constructor-arg index="0" value="http://serviations.bnst.n/toezicht/ka/km/KkService/tnRequest"></constructor-arg>
<constructor-arg index="1" value="http://servtions.bnst.n.tst.st3/toet/ka/km/Kervice"></constructor-arg>
</bean>
<int:chain input-channel="kkChannel" output-channel="dest-channel">
<ws:header-enricher>
<ws:soap-action value="http://servicons.belt.n/toet/ka/kk/KKserice/tnRequest"/>
</ws:header-enricher>
<ws:outbound-gateway uri="http://bb-k1.ts.nst.n/wsb/router" request-callback="WSACallbackKlen" message-sender="kkMsageSender"/>
</int:chain>
如何为https类型创建ws:outbound网关工作?我不知道如何指定证书,如果需要,您需要使用
HttpsUrlConnectionMessageSender
或HttpComponentsMessageSender
在客户端处理SSL,并且在cacerts
存储中确实有适当的客户端证书
有关更多信息,请参阅
您还可以从Spring WS文档中借用一些信息:
从Spring集成的角度来看,没有什么特别的事情要做。
>我尝试了message factory,但出现了错误。
-编辑问题以显示配置和您看到的实际异常。谢谢。使用cmd作为管理员向cacert[of jre]添加了证书。必须了解如何为HttpComponentMessageSender指定先发制人身份验证
org.springframework.ws.client.WebServiceIOException: I/O error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is 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
at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:561)
at org.springframework.integration.ws.SimpleWebServiceOutboundGateway.doHandle(SimpleWebServiceOutboundGateway.java:98)
..
Caused by: 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
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1964)