Hi, Seems the address in WebClient.create() doesn't match the endpoint which your REST service exposed:
Available RESTful services: Endpoint address: http://localhost:7400/ean-services/rs/hotel/v3 WADL : http://localhost:7400/ean-services/rs/hotel/v3?_wadl Regards. -----Original Message----- From: Christopher Cheng [mailto:[email protected]] Sent: Sunday, May 25, 2014 3:35 PM To: [email protected] Subject: java.net.SocketTimeoutException: SocketTimeoutException invoking http://api.ean.com/ean-services/rs/hotel/v3/ping: Read Timeout I am using a CXF 2.7 and try a very simple REST call with this and return the SocketTimeoutException, but I am able to use Chrome to see the results with " http://api.ean.com/ean-services/rs/hotel/v3/ping". What's the problem? WebClient client = WebClient.create("http://api.ean.com/ean-services/rs/hotel/v3/"); client.path("ping"); client.type("text/xml").accept("text/xml"); System.out.println(client.get(String.class)); Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://api.ean.com/ean-services/rs/hotel/v3/ping: Read Timeout at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces sorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc torAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(H TTPConduit.java:1359)
