Hi Chris,

On 3/25/2010 12:53 PM, Kumar Kadiyala wrote:
I have REST based web services some of which use the PUT method. The 
PUT method can contain a request body. The web service works fine 
with Websphere and is out in the field.

We are in the process of migrating to tomcat and I noticed that my 
web service which uses PUT is not able to get the request body 
anymore. I use HttpServletRequest's getInputStream and it always 
returns null.

What is the Content-Type of the request?
KK >> The Content-Type is text/xml.

Changing the method to POST will affect customers in the field and
also breaks RESTful principles.

You shouldn't have to switch to POST. In fact, the problem in your
reference message was that the OP wanted to use POST-style semantics,
that is, use a application/x-www-form-urlencoded body in a PUT, which is
not really appropriate.

Are you saying that you are using PUT and don't have access to your
request body? That definitely should not be happening, unless some other
component is consuming the request body.

KK >> Yes, It does seem like the request body is empty.

Is the InputStream null, or does it just not appear to contain any data?

KK >> I misspoke earlier. The InputStream is not null but the method 
available() on the InputStream is returning 0. If I change the method to POST, 
InputStream's avialable() is returning a value > 0.






      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to