RE: Re: unsupported media type

2014-07-15 Thread Frank Kolnick
OK, I get it now: I have to get the content via a 'data' parameter, not by calling getEntity() :-) It now *almost* works perfectly. I.e., my update method is called, I get the right data, I set the return status to 'SUCCESS_OK' and I'm done. But the client gets a 'no content' code. I'm

RE: Re: unsupported media type

2014-07-15 Thread Frank Kolnick
It's fine if I call setEntity() and return something/anything. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3085219

Re: Re: unsupported media type

2014-07-15 Thread Fabian Mandelbaum
Usually you just: return someRepresentation; // This should automatically set status to HTTP 200 (OK) or: setStatus(Status.SUCCESS_CREATED); // Set status to HTTP 201 return someRepresentation; where someRepresentation is the representation for the response you want to return for the PUT

RE: unsupported media type

2014-07-14 Thread Frank Kolnick
I have tried sending (PUT) with a content-type of text/plain (verified via Fiddler). On the server side, I have tried: @Put(text/plain) @Put(text) @Put(plain) I still get the media error in all cases. What am I doing wrong? Can I tell Restlet to accept *anything*?

RE: unsupported media type

2014-07-14 Thread Fabian Mandelbaum
@Put should be enough to tell Restlet to accept anything El jul 14, 2014 1:16 PM, Frank Kolnick reallyfr...@hotmail.com escribió: I have tried sending (PUT) with a content-type of text/plain (verified via Fiddler). On the server side, I have tried: @Put(text/plain) @Put(text) @Put(plain)

RE: unsupported media type

2014-07-14 Thread Frank Kolnick
Unfortunately, that does not appear to be the case. I.e., that's where I started, and was getting the error. I tried the variations in order to fix the problem, so far without success. @Put should be enough to tell Restlet to accept anything El jul 14, 2014 1:16 PM, Frank Kolnick

Re: unsupported media type

2014-07-14 Thread Fabian Mandelbaum
Euh... I'm sorry but then the problem must be somewhere else. I use @Put all the time, handling the different media types myself, and I only got HTTP 415 when my own-written code explicitly threw ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE). can you please try this on your

unsupported media type

2014-07-11 Thread Frank Kolnick
I get this error when issuing a PUT to a Restlet-based server. Is there a way to tell Restlet to accept 'anything', i.e., all text-based content? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3084952

Re: Unsupported Media Type (415) with Generic Put or Post

2013-01-28 Thread Jerome Louvel
FYI, see follow-up here: http://stackoverflow.com/questions/14409575/unsupported-media-type-415-with-generic-put-or-post Jerome 2013/1/18 Darwin Airola darwinair...@gmail.com Aloha! I was trying to implement a generic put or post method in Restlet. (I was able to implement a generic Get

RE: 415 Unsupported Media Type

2012-08-20 Thread Koot
:8080/user/ HTTP/1.1 User-Agent: Fiddler Host: 127.0.0.1:8080 Content-Length: 53 Content-type: application/json { sid: as4ads68ds468486essf879g8de9sdg } --- RESPONSE: HTTP/1.1 415 Unsupported Media Type X-Powered-By: Servlet/3.0 JSP/2.2

RE: 415 Unsupported Media Type

2012-08-18 Thread Jerome Louvel
test case reproducing the issue? Thanks, Jerome -- http://www.restlet.com http://twitter.com/#!/jlouvel -Message d'origine- De : Koot [mailto:k...@beyondwireless.co.za] Envoyé : jeudi 16 août 2012 11:48 À : discuss@restlet.tigris.org Objet : 415 Unsupported Media Type Hi Sorry

415 Unsupported Media Type

2012-08-16 Thread Koot
Hi Sorry if this is explained and resolved elsewhere, but I could not come right with any explanations found elsewhere on the forum. I am trying to do a simple POST of plain text into my RESTlet API. I'm using the annotation @Post(*:txt|json). There is however just NO way to get the content

Re: [Restlet] Unsupported media type

2012-05-19 Thread Richard Berger
/275-restlet/266-restlet.html Good luck! RB -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restlet-Unsupported-media-type-tp7564930p7566612.html Sent from the Restlet Discuss mailing list archive at Nabble.com

RE: Re: [Restlet] Unsupported media type

2012-05-19 Thread Richard Berger
Do you get the same 415 error when you go to /connection in your browser? (If so, then the problem is in your ServiceConnection class, rather then in your Android code). Also, in my Android code, I don't wrap the resource, but do the call directly on the ClientResource class, as in:

RE: Re: [Restlet] Unsupported media type

2012-05-19 Thread titi
Thank you for your answer. No, it works when I use a web browser. I have the same error with the last code. I don't know if it's the android client or the web server which have a problem. --

RE: Re: [Restlet] Unsupported media type

2012-05-19 Thread Richard Berger
-Unsupported-media-type-tp7564930p7567390.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2963649

[Restlet] Unsupported media type

2012-05-17 Thread titi
;); cr.setRequestEntityBuffering(true); ServiceConnection conn = cr.wrap(ServiceConnection.class); String temp = conn.connect(connect); When I launch the client, I have the following message : E/AndroidRuntime(1079): Unsupported Media Type (415

RE: Unsupported Media Type (415)

2012-04-13 Thread Dalia Sobhy
by ID and address for instance using GET. -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7462259.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http

Re: Unsupported Media Type (415)

2012-04-13 Thread Bjorn Roche
/Unsupported-Media-Type-415-tp5963113p7462259.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2948001 - Bjorn Roche http

RE: Unsupported Media Type (415)

2012-04-10 Thread Dalia Sobhy
I really have the same problem sooo any help plz -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7451061.html Sent from the Restlet Discuss mailing list archive at Nabble.com

RE: Unsupported Media Type (415)

2012-04-10 Thread Dalia Sobhy
I really have the same problem sooo any help plz -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Unsupported-Media-Type-415-tp5963113p7451060.html Sent from the Restlet Discuss mailing list archive at Nabble.com

RE: 415 Unsupported Media Type (me too)

2011-03-08 Thread Anthony
What was your issue please?? How did you solve it!? Thanks -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/415-Unsupported-Media-Type-me-too-tp5986547p6099636.html Sent from the Restlet Discuss mailing list archive at Nabble.com

RE: Unsupported Media Type (415)

2011-02-07 Thread Killian
Hi Jerome, No worries, thanks for your response :-) -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702645

RE: Unsupported Media Type (415)

2011-02-02 Thread Killian
Hi Lads, Could anyone give us some advice on this issue? It'd be really nice to get it working. Thanks :-) -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2701930

RE: Unsupported Media Type (415)

2011-02-02 Thread Killian
I'm just after finding another thread which appears to have a similar problem http://restlet.tigris.org/issues/show_bug.cgi?id=1219 There's no answer for it yet though. Is anyone looking at this thread? It's been more than a week now since this issue was posted?

415 Unsupported Media Type (me too)

2011-02-02 Thread Scott Shea
I did not want to hijack another thread if this is due to my own stupidity. I use wget to call my service while I am debugging it in Eclipse and get the 415 Unsupported Media Type error. Calling command and code below. Any help would be appreciated. $ wget --post-data'StatusId=3EndTime

RE: 415 Unsupported Media Type (me too)

2011-02-02 Thread Scott Shea
I think I found my idiocy... nevermind -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2702094

RE: Unsupported Media Type (415)

2011-01-31 Thread Killian
Hi Bjorn, Thanks very much for your help. Yes, in the mean time since I posted this message I came to the same conclusion too, however, using plain java objects with REST was really what was attracting me most with Restlet, so if I could find a way to avoid using forms altogether it'd be very

RE: Unsupported Media Type (415)

2011-01-28 Thread Bjorn Roche
My ContactServerResource is similar to the example: @Get public Contact retrieve(Contact contact) { return contact; } @Put public void store(Contact contact) { ContactServerResource.contact = contact; } I am also a noob,

Unsupported Media Type (415)

2011-01-26 Thread Killian
. However, if I place a Contact object as a parameter it is always received as null. The method causing most problems is the @Put method. When I call the store method, the client throws the following: Caused by: Unsupported Media Type (415) - OK at org.restlet.resource.ClientResource$1

RE: 405 on unsupported media type

2010-09-01 Thread Thierry Boileau
Hello, thansk Avi, I've completed the issue 1172 (http://restlet.tigris.org/issues/show_bug.cgi?id=1172). Best regards, Thierry Boileau -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2654055

405 on unsupported media type

2010-08-27 Thread Avi Flax
Hi all, I'm using 2.0 jse. I've got a method that has this signature: @Post(form) public Representation accept(Form form) throws ResourceException { Everything generally works fine, but when I send a request with an unsupported Content-Type — text/plain, say — the service returns 405 Method Not

Re: 405 on unsupported media type

2010-08-27 Thread Jonathan Hall
I believe that's a 415. Jon On 27/08/10 19:33, Avi Flax wrote: Hi all, I'm using 2.0 jse. I've got a method that has this signature: @Post(form) public Representation accept(Form form) throws ResourceException { Everything generally works fine, but when I send a request with an

Re: 405 on unsupported media type

2010-08-27 Thread Avi Flax
Ah, yes, definitely. My bad, thanks. On Fri, Aug 27, 2010 at 16:27, Jonathan Hall jonrh...@gmail.com wrote: I believe that's a  415. Jon On 27/08/10 19:33, Avi Flax wrote: Hi all, I'm using 2.0 jse. I've got a method that has this signature: @Post(form) public Representation

Re: What is the correct way to return 415 Unsupported Media Type

2008-10-31 Thread Thierry Boileau
Hello Gabriel, this is a very good question which has no answer yet, I think. I've entered a new RFE = http://restlet.tigris.org/issues/show_bug.cgi?id=637 Right now I do the following, is this the way to go? That's fine for me. Best regards, Thierry Boileau -- Restlet ~ Core developer ~

What is the correct way to return 415 Unsupported Media Type

2008-10-30 Thread Gabriel Falkenberg
Hi, there is a standard way to tell the framework which media types is supported on a GET via getVariants().add(...). Is there a similar way to tell the framework which media types a resource accepts on POST/PUT? Right now I do the following, is this the way to go? /** * Handle POST request */