访问https 的webservice出错
客户端调用webservice时报错
严重:
java.net.ConnectException: Connection refused: connect
Exception in thread "main" org.codehaus.xfire.XFire
RuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message.
org.codehaus.xfire.fault.XFireFault: Couldn't send message.
at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy8.receiveChannelTxn(Unknown Source)
at https.webservice_bjf_bcpomis_bc_com.internettxn.InternetTxnClient.main(InternetTxnClient.java:105)
Caused by: org.codehaus.xfire.XFireException: Couldn't send message.
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:145)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
... 8 more
Caused by: java.net.
ConnectException: Connection refused: connect
服务器端确定开着,并且通过https://192.168.0.161:8443/BCPOMIS/services/InternetTxn?wsdl可以访问,wsdl中地址也没错,高手帮忙看下说明问题。
调用代码如下
System.setProperty("javax.net.ssl.trustStore", "D:/SSL/client/client.truststore");
System.setProperty("javax.net.ssl.trustStorePassword","client");
// System.setProperty("javax.net.ssl.keyStoreType","PKCS12") ;
// System.setProperty("javax.net.ssl.keyStore","D:/SSL/client/client.p12") ;
// System.setProperty("javax.net.ssl.keyStorePassword","client") ;
String receiveChannelTxn = service.receiveChannelTxn("2222", "898440358121779", "51490600****8626", "22.12");
------解决方案--------------------好吧,问题搞定了。。。
------解决方案--------------------LZ 。。。 这~~ 是自问自答嚒。 我的分啊