I've been trying to get the DELETE, PUT and POST working with the
restfull_http_binding sample. I've edited file
apache-cxf-2.0.2-incubator\samples\restful_http_binding\ClientMain.java to
include:
cs.deleteCustomer(123);
which produced error:
Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support
output
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:851)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1771)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1786)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
also, I've added either:
Customer c = new Customer();
c.setId(12);
c.setName("John");
cs.addCustomer(c);
or
Customer c = new Customer();
c.setId(123);
c.setName("John");
cs.updateCustomer(c);
which would result in:
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:659)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:604)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:961)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1860)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:576)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
Am I to blame here?
--
View this message in context:
http://www.nabble.com/problems-with-REST-delete%2C-post---put-tf4797835.html#a13726097
Sent from the cxf-issues mailing list archive at Nabble.com.