If the content-type is "application/x-www-form-urlencoded”, camel-restlet puts the from data into the message header, the form field name is the header key, the form field value is the header value.
-- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On July 3, 2014 at 3:02:52 AM, abhijit.kulkarni ([email protected]) wrote: > Hello, > > I am using Apache camel 2.10.7 and have a route which is a restlet > > > > There is another system B, when it calls the same restlet, (doing a POST to > the url http://host:port/abc/xyz) the body comes to be null. somehow the > http request body is not getting copied to exchange message body. The > exchange when I logged is Exchange[ExchangePattern:InOut, BodyType:null, > Body:[Body is null], CaughtExceptionType:......] > While debugging I have noticed that this happens when the system B - > 1. sets the content type to "application/x-www-form-urlencoded" (which is a > web application form submit) > 2. does not set any content type explicitly, so the default gets set which > is "application/x-www-form-urlencoded". > > The System B is an external system and cannot be changed. The System A has > been already integrated with this restlet based route and is in production. > > As per the documentation, the message header content-type is defaulted to > application/x-www-form-urlencoded, but when I accessed and printed this > header, it was printed as null. > Also, message request header CamelAcceptContentType also got printed as > null. > > Please help, as I have to re-use this route for the integration with the > System B. > > Cheers, > Abhijit > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Restlet-and-mesaage-body-null-based-on-content-type-tp5753232.html > > Sent from the Camel - Users mailing list archive at Nabble.com. >
