Hi David,
First of all, thanks for the fast response.

I already made the change in the "remote-services.xml", but unfortunally
this didn't provide the hoped result.

BTW, I will try using discovery. 
Please, can you confirm if using the discovery I still need the OSGI-INF
files (intent-map.xml & remote-service.xml) that I am using for the original
Greeter example?

Thanks in advance.
Kind regards.
Maurizio


David Bosschaert wrote:
> 
> Yes, make sure the the configuration in your
> OSGI-INF/remote-service/remote-services.xml file contains the right host
> name (by default it contains localhost). Assuming you're not using
> discovery
> this file must contain the correct URL of the remote service.
> 
> If you run the system using discovery, you don't have to provide this
> static
> URL as it will be published & discovered dynamically. See here for the
> discovery demo: http://cxf.apache.org/dosgi-discovery-demo-page.html
> 
> Hope this helps,
> 
> David
> 
> 2009/10/5 Daniel Kulp <[email protected]>
> 
>>
>> The key one is java.net.ConnectException: Connection refused: connect
>>
>> That seems to imply that the service isn't running on the given URL.   I
>> would
>> definitely double check that the server side part is running and
>> available.
>>
>> Dan
>>
>>
>> On Mon October 5 2009 5:44:05 am MaurizioLilli wrote:
>> > Hi,
>> > I'm using the Greeter example from the Apache CXF - Distributed OSGi. I
>> > downloaded the samples from the usual repository.
>> > I have installed a Felix Server and an Equinox client on a single
>> machine,
>> > and the example works great!
>> > Then I separated the two OSGi applications on two separate phisical
>> > machines, and at this point when I run the client-bundle on the Equinox
>> > console I get an exception and no communication happen between the two
>> >  peer. Here are the detals of the exception:
>> > "
>> > *** Opening greeter client dialog ***
>> > 02-Oct-2009 16:05:29 org.apache.cxf.dosgi.dsw.hooks.AbstractClientHook
>> > cacheEndpointId
>> > INFO: caching proxy registration for endpoint ID:
>> > bb6beb4f-c3e8-41e2-97b6-e818749f119d
>> > 02-Oct-2009 16:05:29
>> > org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService
>> bundleChanged
>> > INFO: bundle changed: org.eclipse.osgi
>> > *** Invoking greeter ***
>> > 02-Oct-2009 16:05:37 org.apache.cxf.phase.PhaseInterceptorChain
>> doIntercept
>> > INFO: Interceptor has thrown exception, unwinding now
>> > org.apache.cxf.interceptor.Fault: Could not send Message.
>> > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageS
>> > enderEndingInterceptor.handleMessage(MessageSenderIntercepto r.java:64)
>> > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(Phase
>> > InterceptorChain.java:236)
>> > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:46 9)
>> > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:29 9)
>> > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:25 1)
>> > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.j ava:73)
>> > at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java: 68)
>> > at $Proxy34.greetMe(Unknown Source)
>> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> > at java.lang.reflect.Method.invoke(Unknown Source)
>> > at org.apache.cxf.dosgi.dsw.handlers.ServiceInvocationHandler.i
>> > nvoke(ServiceInvocationHandler.java:46)
>> > at $Proxy34.greetMe(Unknown Source)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator.greete
>> > rUI(Activator.java:71)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator.access
>> > $000(Activator.java:32)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator$2.run(
>> > Activator.java:59)
>> > at java.lang.Thread.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.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(Unk nown
>> >  Source) at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
>> >  Source) at
>> sun.net.www.protocol.http.HttpURLConnection.getOutputStream(
>> >  Unknown Source)
>> > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStrea
>> > m.handleHeadersTrustCaching(HTTPConduit.java:1907)
>> > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStrea
>> > m.onFirstWrite(HTTPConduit.java:1862)
>> > at org.apache.cxf.io.AbstractWrappedOutputStream.write(Abstract
>> > WrappedOutputStream.java:42)
>> > at org.apache.cxf.io.AbstractThresholdOutputStream.write(Abstra
>> > ctThresholdOutputStream.java:69)
>> > at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStrea
>> > m.close(HTTPConduit.java:1925)
>> > at org.apache.cxf.transport.AbstractConduit.close(AbstractCondu
>> it.java:66)
>> > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.
>> java:626)
>> > at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageS
>> > enderEndingInterceptor.handleMessage(MessageSenderIntercepto r.java:62)
>> > ... 17 more
>> > Exception in thread "Thread-6"
>> > java.lang.reflect.UndeclaredThrowableException
>> > at $Proxy34.greetMe(Unknown Source)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator.greete
>> > rUI(Activator.java:71)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator.access
>> > $000(Activator.java:32)
>> > at org.apache.cxf.dosgi.samples.greeter.client.Activator$2.run(
>> > Activator.java:59)
>> > at java.lang.Thread.run(Unknown Source)
>> > "
>> >
>> > Any idea what I can be using wrong or I need to configure?
>> >
>> > Thanks in advance
>> > Kind regards.
>> > Maurizio
>> >
>>
>> --
>> Daniel Kulp
>> [email protected]
>> http://www.dankulp.com/blog
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Exception-running-CXF-client-side-tp25747848p25765449.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to