cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <bimargul...@gmail.com>
Subject Re: CXF Client connection refused error
Date Sun, 09 Jan 2011 21:50:12 GMT
Really? Why?

On Sun, Jan 9, 2011 at 4:45 PM, Michael <mtarullo463@optonline.net> wrote:
> Try changing the filename part of you URL to \testservice.wsdl?wsdl
>
> ----- Original Message ----- From: "Benson Margulies"
> <bimargulies@gmail.com>
> To: <users@cxf.apache.org>
> Sent: Sunday, January 09, 2011 1:43 PM
> Subject: Re: CXF Client connection refused error
>
>
> Are you sure that you don't have a global proxy config for your
> browser that you haven't established in the java program?
>
> Have you tried writing a tiny Java program to just connect to that URL?
>
>
> On Fri, Dec 31, 2010 at 3:44 PM, kbhatt <kbhatt@rediffmail.com> wrote:
>>
>> Hello,
>>
>> I have written a simple(cxf based) web service. When I try to access it
>> from(cxf based web service) client, I am getting the connection refused
>> error.
>>
>> My web service is as follows:
>>
>> @WebService
>> public interface ITest {
>>
>> String sayHi(String name);
>>
>> }
>>
>> @WebService(targetNamespace ="http://localhost.ws", name="testSOAP")
>> public class Test implements ITest {
>> @Override
>> public String sayHi(String name) {
>> return "Hi "+name;
>> }
>> }
>>
>>
>> Client code is as follows
>>
>> Client client =
>>
>> dcf.createClient("http://localhost:8080/multiModuleProjectArtifactIdWeb/testservice/testservice?wsdl");
>> Object[] results = client.invoke("sayHi", "kamlesh");
>> String result = (String)results[0];
>>
>> When I run this client, I am getting the "connection refused" error. I am
>> invoking this client code from swing UI button click action. I am using
>> cxf
>> version 2.2.10.
>>
>> Please note I am able to access the wsdl at above url from browser.
>>
>> Following is the exception stack of the client.
>>
>> INFO: Pre-instantiating singletons in
>>
>> org.springframework.beans.factory.support.DefaultListableBeanFactory@1f94a1f:
>> defining beans
>>
>> [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.bindin
>
> g.corba.
> CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.management.
> InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws
> .rm.
> RMAssertionBuilder,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#1];
>>
>> root of factory hierarchy
>> org.apache.cxf.service.factory.ServiceConstructionException: Could not
>> resolve URL
>>
>> "http://localhost:8080/multiModuleProjectArtifactIdWeb/testservice/testservice?wsdl".
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:566)
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:253)
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:198)
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:191)
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:146)
>> at tv.socialkast.client.ws.WSClient.<init>(WSClient.java:56)
>> at
>>
>> tv.socialkast.upload.client.gui.UploadDirectoryChooser$DoneActionListener.actionPerformed(UploadDirectoryChooser.java:382)
>> at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
>> at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
>> at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
>> at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
>> at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
>> Source)
>> at java.awt.Component.processMouseEvent(Unknown Source)
>> at javax.swing.JComponent.processMouseEvent(Unknown Source)
>> at java.awt.Component.processEvent(Unknown Source)
>> at java.awt.Container.processEvent(Unknown Source)
>> at java.awt.Component.dispatchEventImpl(Unknown Source)
>> at java.awt.Container.dispatchEventImpl(Unknown Source)
>> at java.awt.Component.dispatchEvent(Unknown Source)
>> at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
>> at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
>> at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
>> at java.awt.Container.dispatchEventImpl(Unknown Source)
>> at java.awt.Window.dispatchEventImpl(Unknown Source)
>> at java.awt.Component.dispatchEvent(Unknown Source)
>> at java.awt.EventQueue.dispatchEvent(Unknown Source)
>> at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
>> at java.awt.EventDispatchThread.run(Unknown Source)
>> Caused by: java.net.ConnectException: Connection refused: connect
>> at java.net.PlainSocketImpl.socketConnect(Native Method)
>> at java.net.PlainSocketImpl.doConnect(Unknown Source)
>> at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
>> at java.net.PlainSocketImpl.connect(Unknown Source)
>> at java.net.SocksSocketImpl.connect(Unknown Source)
>> at java.net.Socket.connect(Unknown Source)
>> at sun.net.NetworkClient.doConnect(Unknown Source)
>> at sun.net.www.http.HttpClient.openServer(Unknown Source)
>> at sun.net.www.http.HttpClient.openServer(Unknown Source)
>> at sun.net.www.http.HttpClient.<init>(Unknown Source)
>> at sun.net.www.http.HttpClient.New(Unknown Source)
>> at sun.net.www.http.HttpClient.New(Unknown Source)
>> at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
>> Source)
>> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown
>> Source)
>> at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
>> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
>> Source)
>> at org.apache.cxf.resource.URIResolver.tryFileSystem(URIResolver.java:167)
>> at org.apache.cxf.resource.URIResolver.<init>(URIResolver.java:90)
>> at
>>
>> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.composeUrl(DynamicClientFactory.java:558)
>> ... 31 more
>> java.lang.NullPointerException
>> at
>>
>> tv.socialkast.client.ws.WSClient.invokeUploadMetaDataService(WSClient.java:68)
>> at
>>
>> tv.socialkast.upload.client.gui.UploadDirectoryChooser$DoneActionListener.actionPerformed(UploadDirectoryChooser.java:383)
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/CXF-Client-connection-refused-error-tp3323904p3323904.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
>

Mime
View raw message