Hi Sergey,

I moved the annotations to Interface and changed the conf. to use jaxrs
instead of http-binding.
I tried to access the service with this code:
                HelloWorld helloWorld =
JAXRSClientFactory.create("http://localhost:8081/SampleRestProject/helloWorld/customers";,
HelloWorld.class);
                Customer customer = helloWorld.getCustomers();
                System.out.println(customer.getName());

I get this exception: java.lang.IllegalStateException: Already connected 

When tried with WebClient:
GET:
WebClient clnt = WebClient
                                
.create("http://localhost:8081/SampleRestProject/helloWorld/customer";);
                clnt.accept("application/json");
                HelloWorld helloWorld = clnt.get(HelloWorld.class);
                helloWorld.getCustomers();
I get "org.apache.cxf.interceptor.Fault: Could not send Message."

POST Error:
".No message body reader found for class : interface com.tfs.pe.HelloWorld,
ContentType : application/json."

Thanks
Padmavathi V.



-- 
View this message in context: 
http://old.nabble.com/Re%3A-JAXRS---POST-tp26904409p27071227.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to