You can take a look at the unit test[1] of camel-jetty[2].
Basically, you can get the message body as an input stream, and you get the HttpServletRequest object from the message header with the key Exchange.HTTP_SERVLET_REQUEST.

[1]https://svn.apache.org/repos/asf/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/HttpRouteTest.java

[2]http://camel.apache.org/jetty.html

On 11/3/10 1:13 AM, Karthz wrote:

Hi,

I have been trying to send a Message to a Http Server, using POST method. I
set the message body with the data that the http server expects.

However, since we are using a third-party service, we made a mock of our own
to test it out. For this mock, how do I receive a POST request? Where would
the message body be, in the request I receive?

I thought the message body would be in the HttpServletRequest object as
attributes, or params, but none of them have what I am looking for.

Any ideas?

Thanks.

-----
- Karthz


--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
         http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Reply via email to