You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Alexey Markevich (JIRA)" <ji...@apache.org> on 2015/04/10 14:52:12 UTC
[jira] [Commented] (CAMEL-7856) camel-cxf producer HttpAPI should
not send the message body when using DELETE method
[ https://issues.apache.org/jira/browse/CAMEL-7856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14489551#comment-14489551 ]
Alexey Markevich commented on CAMEL-7856:
-----------------------------------------
Camel 2.13.4
{noformat}
.setBody().constant("123")
.setHeader(org.apache.camel.Exchange.HTTP_PATH, simple("${header.newCustomer}"))
.setHeader(org.apache.camel.Exchange.HTTP_METHOD, constant("DELETE"))
.inOut("cxfrs://bean://cCXFRS_4")
{noformat}
cause
{noformat}
org.apache.cxf.interceptor.Fault: .Problem with writing the request message, class : class java.lang.String, ContentType : application/xml.
at org.apache.cxf.jaxrs.client.WebClient$BodyWriter.doWriteBody(WebClient.java:1197)
at org.apache.cxf.jaxrs.client.AbstractClient$AbstractBodyWriter.handleMessage(AbstractClient.java:1058)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:635)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1067)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:878)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:410)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:220)
at org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:92)
...
Caused by: java.net.ProtocolException: HTTP method DELETE doesn't support output
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1082)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:174)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1289)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1245)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:201)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)
at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:60)
at org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:89)
at org.apache.cxf.jaxrs.provider.PrimitiveTextProvider.writeTo(PrimitiveTextProvider.java:77)
at org.apache.cxf.jaxrs.utils.JAXRSUtils.writeMessageBody(JAXRSUtils.java:1299)
at org.apache.cxf.jaxrs.client.AbstractClient.writeBody(AbstractClient.java:436)
... 27 more
{noformat}
> camel-cxf producer HttpAPI should not send the message body when using DELETE method
> ------------------------------------------------------------------------------------
>
> Key: CAMEL-7856
> URL: https://issues.apache.org/jira/browse/CAMEL-7856
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf
> Affects Versions: 2.12.4, 2.13.2, 2.14.0
> Reporter: Willem Jiang
> Assignee: Willem Jiang
> Fix For: 2.12.5, 2.13.3, 2.14.1, 2.15.0
>
>
> Here is the [discussion|http://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request] in stackoverflow.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)