Hello Soumik,

are you 100% sure that the Content-Type (this is the correct spelling)
HTTP header is set to application/xml (or any of its compatible types,
for example text/xml)?

You can use any of the http proxy tools out there (Charles comes to
mind, but there's even addons for Firefox to sniff HTTP traffic) to
check the traffic between the client and your server resource.

If your class extends ServerResource, and it's correctly mapped
(routed) to the URI you are calling from your client, and your client
is both setting the HTTP Content-Type header properly and encoding the
request body properly, you should see that handler being called and
serving the request fine...

What are you using on the client side? For testing your REST API, you
can use http://code.google.com/p/rest-client/ which allows you to
setup your requests as you wish for testing. Other tools can be used
too, for example curl, but they are a bit less user-friendly, they
need lots of options on the command line (curl is a very flexible
command line HTTP, and other protocols too, like FTP, client tool).

Hope this helps, good luck

On Mon, May 16, 2011 at 3:49 PM, soumik biswas <[email protected]> wrote:
> Hi Fabian,
>  With the code changes you suggested I'm getting a HTTP code 415 as response.
> The ServerResource is not even recognizing the POST request as 
> application/xml type.
>
> The HTTP POST request content is the same, content-type: application/xml.
>
> -Soumik
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2738297
>



-- 
Fabián Mandelbaum
IS Engineer

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2738388

Reply via email to