camel-jetty support the multipart form post by default, it could cause some 
trouble if you just want to proxy the request of multipart form post.
You can disable this feature by setting enableMultipartFilter option to be 
false like this.

from("jetty:http://{{smx.host}}:{{smx.rest-proxy-port}}/?matchOnUriPrefix=true&enableMultipartFilter=false";)
.to("jetty:http://{{real-server-address}}:{{real-ws-port}}/?bridgeEndpoint=true&throwExceptionOnFailure=false";)


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Thursday, November 7, 2013 at 4:42 PM, berdoni wrote:

> I have deployed on SMX the following Camel route that proxies all ReST
> request to the real ReST service provider (Tomcat). All ReST calls to SMX
> routed successfully however a saveDocument service that uploads PDF files
> fail.
>  
> public void configure() throws Exception {
> from("jetty:http://{{smx.host}}:{{smx.rest-proxy-port}}/?matchOnUriPrefix=true";)
> .to("jetty:http://{{real-server-address}}:{{real-ws-port}}/?bridgeEndpoint=true&throwExceptionOnFailure=false";)
> }
>  
> The following exception is logged in servicemix.log.
>  
> ERROR | HttpClient-1374 | DefaultErrorHandler | 95 -
> org.apache.camel.camel-core - 2.10.4 | Failed delivery for... Exhausted
> after delivery attempt: 1 caught: org.apache.camel.CamelExchangeException:
> JettyClient failed cause by: null. Exchange[Message: [Body is instance of
> org.apache.cam
> el.StreamCache]]. Caused by: [java.lang.IndexOutOfBoundsException - null]
> org.apache.camel.CamelExchangeException: JettyClient failed cause by: null.
> Exchange[Message: [Body is instance of org.apache.camel.StreamCache]].
> Caused by: [java.lang.IndexOutOfBoundsException - null]
>  
> Do I have to perform some additional processing or configuration before
> redirect the call to the real ReST service? The route works when I use a
> small txt files up to 6-7KB.
>  
> Is it possible to set jetty to accept big size files?  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Jetty-proxy-Rest-service-fails-for-file-uploading-tp5742769.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to