当前位置:编程学习 > JAVA >>

各位大侠帮忙,webservice报错:Connection refused,Couldn't send message,请帮忙看看问题出在哪里?我只有客户端

[2011-05-16 10:19:16,796] 1635052 [DEBUG] Method [payoutQuery] [https.payout_api_cmtpartnernetwork.PayoutQueryRequest@642c642c]
[2011-05-16 10:19:16,796] 1635052 [DEBUG] adding handler org.codehaus.xfire.handler.OutMessageSender@4eea4eea to phase send
[2011-05-16 10:19:16,796] 1635052 [DEBUG] adding handler org.codehaus.xfire.soap.handler.SoapActionOutHandler@3a163a16 to phase transport
[2011-05-16 10:19:16,796] 1635052 [DEBUG] adding handler org.codehaus.xfire.soap.handler.SoapSerializerHandler@76b076b0 to phase post-invoke
[2011-05-16 10:19:16,796] 1635052 [DEBUG] Invoking phase post-invoke
[2011-05-16 10:19:16,796] 1635052 [DEBUG] Invoking handler org.codehaus.xfire.soap.handler.SoapSerializerHandler in phase post-invoke
[2011-05-16 10:19:16,796] 1635052 [DEBUG] Invoking phase policy
[2011-05-16 10:19:16,797] 1635053 [DEBUG] Invoking phase user
[2011-05-16 10:19:16,797] 1635053 [DEBUG] Invoking phase transport
[2011-05-16 10:19:16,797] 1635053 [DEBUG] Invoking handler org.codehaus.xfire.soap.handler.SoapActionOutHandler in phase transport
[2011-05-16 10:19:16,797] 1635053 [DEBUG] Invoking phase send
[2011-05-16 10:19:16,797] 1635053 [DEBUG] Invoking handler org.codehaus.xfire.handler.OutMessageSender in phase send
[2011-05-16 10:19:16,799] 1635055 [ERROR] java.net.ConnectException: Connection refused
[2011-05-16 10:19:16,800] 1635056 [ERROR] Exception:
org.codehaus.xfire.XFireRuntimeException: 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 $Proxy82.payoutQuery(Unknown Source)
 at com.ccc.test.transaction.cmt.PayoutQueryRemoteServiceImpl.doTask(PayoutQueryRemoteServiceImpl.java:55)
 at com.ccc.test.transaction.cmt.CmtRemoteServiceAbstract.execute(CmtRemoteServiceAbstract.java:125)
 at com.ccc.test.transaction.tcc.atom.query.PayinQueryServiceImpl.callCmtInterf(PayinQueryServiceImpl.java:649)
 at com.ccc.test.transaction.tcc.atom.query.PayinQueryServiceImpl.doingBussiness(PayinQueryServiceImpl.java:126)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:615)
 at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
 at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
 at $Proxy41.doingBussiness(Unknown Source)
 at com.ccc.test.transaction.tcc.control.InjectTccImpl.runAtom(InjectTccImpl.java:181)
 at com.ccc.test.transaction.tcc.control.InjectTccImpl.runListAtoms(InjectTccImpl.java:147)
 at com.ccc.test.transaction.tcc.control.InjectTccImpl.runAtom(InjectTccImpl.java:181)
        at com.ccc.test.transaction.tcc.control.InjectTccImpl.runListAtoms(InjectTccImpl.java:147)
        at com.ccc.test.transaction.tcc.control.InjectTccImpl.excuteTrade(InjectTccImpl.java:101)
        at com.ccc.test.transaction.tcc.control.InjectTccImpl.activingAssembly(InjectTccImpl.java:76)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
        at $Proxy33.activingAssembly(Unknown Source)
        at com.ccc.test.transaction.test.PietHandler.deal_8801(PietHandler.java:186)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at com.ccc.test.interf.service.ServiceProxy.excuteServices(Unknown Source)
        at com.ccc.test.interf.deploy.servlet.AbstractServlet.excuteServices(Unknown Source)
        at com.ccc.test.transaction.test.PietServlet.servletExcute(PietServlet.java:86)
        at com.ccc.test.interf.deploy.servlet.AbstractServlet.excute(Unknown Source)
        at com.ccc.test.interf.deploy.servlet.AbstractServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at com.ccc.test.startup.IPMonitorFilter.doFilter(IPMonitorFilter.java:63)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by:
org.codehaus.xfire.XFireException: Couldn't send message.
        at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:145)
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)
        ... 63 more
Caused by:
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:372)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:233)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:220)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385)
        at java.net.Socket.connect(Socket.java:541)
        at java.net.Socket.connect(Socket.java:491)
        at java.net.Socket.<init>(Socket.java:399)
        at java.net.Socket.<init>(Socket.java:268)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:79)
        at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:121)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1321)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:369)
        at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)
        ... 65 more --------------------编程问答-------------------- 补充:服务端是另外一个公司的,我无法查看,服务端的url可以正常访问。
在客户端我是通过apache进行服务转发的,转发的地址没有问题。 --------------------编程问答-------------------- 把源码贴出来研究一下。 --------------------编程问答-------------------- 关注这个问题       --------------------编程问答-------------------- org.codehaus.xfire.client.Client.getInstance(
(PayoutServiceSoap)(this).getEndpoint(new QName("https://payout.api.test.com", "PayoutServiceSoap"))
).setUrl(url)
org.codehaus.xfire.client.Client.getInstance(payoutServiceSoap).setTimeout(defaultTimeOut);
PayoutQueryResponseEntity response = payoutServiceSoap.payoutQuery(request);
public PayoutQueryResponseEntity payoutQuery(
        @WebParam(name = "PayoutQueryRequestEntity", targetNamespace = "https://payout.api.test.com")
        https.payout_api_test.PayoutQueryRequestEntity PayoutQueryRequestEntity);
以上是webservice调用的部分源码。 --------------------编程问答-------------------- 请各位大侠接力啊! --------------------编程问答-------------------- org.codehaus.xfire.XFireException: Couldn't send message.
同问
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,