Hi, I'm hoping maybe this problem looks familiar to somebody out there..
I'm using Restlet 2.1.4 on GAE, and I'm seeing intermittent NPEs with the
(partial) stack trace below. This is happening on about 1% of requests.
17:00:19.465 org.restlet.engine.io.BioUtils getReader: The GAE edition is
u
Hold on, it looks like there was an update to ConverterService about a year ago
that addressed this (by no longer squelching the exception). It's just not in
2.1, which is what I'm using. Any chance it might be backported to 2.1?
--
http://r
If, during conversion of a request body, my converter's (subclass of
ConverterHelper) toObject method identifies some problem with the structure or
content of the body, I'd like to be able to return detailed information back to
the client in the response body (e.g. "missing field 'foo'").
Howev
When the browser sends the OPTIONS pre-flight request, the server needs to
respond with a Access-Control-Allow-Methods header indicating which methods are
supported for CORS requests.
I'm doing something like this (hopefully the formatting won't get mangled...):
Series requestHeaders =
I took a closer look today, and it's not the ignoreParameters that's at fault
(in fact, it should be considered included regardless of whether
ignoreParameters is true or false, since ignoreParameters applies to "this" and
not "included", and "this" has no parameters).
I think the fix would be
4 1/2 years later, I have a follow-up question :-)
shouldn't
"application/json"
include
"application/vnd.foo.bar-baz-v1+json; level=3"
?
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3067938
Upon further reflection, I've concluded that this isn't necessarily a bug in
the converters (they're free to return a positive score for a null target
Variant if they want), but rather a bug in ServerResource.doConditionalHandle.
If content negotation is in strict mode and getPreferredVariant()
I forgot to mention one other thing...
In converterService.toRepresentation, after getting the ObjectRepresentation
back from GwtConverter, there's a null pointer exception in the following code,
due to target being null.
if (result.getEncodings().isEmpty()) {
result.ge
Thanks, Tim. I'll give your approach a try (replacing those converters with my
own).
-Andy
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2947791
Here's my use case:
I'm submitting a conditional GET (using If-None-Match, although I don't think
that's relevant) request that also specifies a media type in the Accept header
that doesn't match any of the media types supported by the target resource
(i.e. it doesn't correspond to any of the m
Hi Tim, wow, thanks for the detailed response.
Let me take this bit by bit to keep things comprehensible.
> I use decorator factory methods in my Applications to allow me to
> specify filtering compactly for each individual resource path. Doesn't
> have to be fancy:
>
> // AbcServerResource
Oops, I forgot to address the question of authorization based on identity and
resource instance state. I'm assuming I'd do that inside the ServerResource
itself, right?
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/combining-role-and-method-authorization-tp7366193
As a followup to my previous question, just to make things more interesting,
I also would like to mix in authorization based on identity and resource
instance state. For example, in addition to the rules I mentioned, an
authenticated user may PUT or DELETE a collection item they created, but not
c
I have a variety of resources that have specific authorization rules, e.g.
collection resources that allow anonymous users to GET, authenticated users
to GET or POST (to create a new item), and admins to GET/PUT/POST/DELETE.
I'm looking at MethodAuthorizer and RoleAuthorizer, but I'm not sure of
OK, this is what ended up working:
-keep class org.restlet.resource.* { *; }
-keep class org.restlet.engine.adapter.* { *; }
It's likely that the class specification could be narrowed further with
additional trial and error, but for me, the returns are diminishing.
-
update - I'm zeroing in on the solution, I think. I'll post again when I've
got it.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2928561
I just recently started leveraging ProGuard to shrink/obfuscate my Android
app that uses Restlet. I've run into a problem at the point where my app
invokes a method on a dynamic resource proxy generated by
ClientResource.wrap().
Specifically, I'm getting a "java.lang.AbstractMethodError: abstract
Hi Tim,
Yes, you've surmised my situation correctly. Thanks for the response, that
approach is working for me now.
-Andy
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/how-to-set-ETag-response-header-from-ServerResource-annotated-method-tp7309680p7333755.html
Sen
Did anybody log an issue for this? I didn't see one, but I don't want to log
a dup.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Post-generic-parameter-conversion-bug-missing-feature-tp7223520p7319344.html
Sent from the Restlet Discuss mailing list archive at Nab
I'd like to set an ETag response header while processing a request within my
ServerResource subclass. I tried
getResponseEntity().setTag(new Tag("foo));
but this doesn't work, because there is no entity in the response object yet
(getResponseEntity returns null).
What's the right way to do t
I'm trying to POST a form from GWT client code to GAE server code.
The annotated interface shared by both sides is
import org.restlet.client.data.Form;
import org.restlet.client.resource.Post;
public interface MyResource {
@Post("form")
void doSomething(Form form);
}
What's the right w
I ran into the same issue recently. I was going to try to fix it, but the
reflection code was too hairy for me :-)
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2911894
Update: I have logged an issue for this:
http://restlet.tigris.org/issues/show_bug.cgi?id=1361
http://restlet.tigris.org/issues/show_bug.cgi?id=1361
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/accessing-response-Status-from-GWT-client-code-works-in-hosted-mode-b
Problem solved. I was missing the necessary parameters in web.xml. See
http://wiki.restlet.org/docs_2.0/13-restlet/275-restlet/312-restlet/379-restlet.html.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2892751
further experiments show that the problem doesn't happen when the request is
successful (200). When it's a 302, the problem reproduces. Not sure about
other status codes.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/accessing-response-Status-from-GWT-client-code
FWIW, the same problems occur in production mode regardless of whether
deferred binding is used or not. Today I tried this:
ClientResource r = new ClientResource("/admin/myresource");
r.setOnResponse(new Uniform() {
@Override
public void handle(final Request reques
last update for today... I upgrade to 2.1RC1 of the GWT edition of Restlet,
but it didn't help.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/accessing-response-Status-from-GWT-client-code-works-in-hosted-mode-but-not-production-tp7083856p7084566.html
Sent from the
Hmm, for a minute there I thought I might be able to get at the response
headers. I discovered that I can do this:
Series responseHeaders =
(Series) myClientResource.getResponse().getAttributes().get(
HeaderConstants.ATTRIBUTE_HEADERS);
And in hosted mode, it works, but once again, n
OK, after some further debugging in hosted mode, although I don't see the
root of my problem in production mode, I do see that ClientAdapter.commit()
is doing:
// Send the request to the client
httpCall.sendRequest(request, response, new Uniform() {
Correction, the reason phrase is null in hosted mode, also -- sorry.
So, I tried accessing the response's status description instead, via
Status.getDescription(). But it turns out that this is empty in production
mode, while non-empty in in hosted mode. So I still have a similar problem.
-An
Hi,
I'm using Restlet 2.1 M5 in my GWT client and my GAE server code. When I
make a request to the server in hosted mode, in my onSuccess() method, I'm
able to access the response's status code and reason phrase via
ClientResource.getResponse().getStatus(), using Status.getCode() and
Status.getR
Minor update, but still stuck. I can see that when
org.restlet.ext.net.jar.HttpClientHelper is constructed, it's in the context of
org.restlet.engine.Engine's construction.
It adds the necessary protocols (HTTP, HTTPS) to the List held by its
ConnectorHelper superclass, and the HttpClientHelpe
I have a GAE app and I'm trying to make an outbound HTTP GET request (using the
ROME extension). I've added the org.restlet.ext.net.jar file to my classpath
as described in sectino 8.5.2 of the Restlet in Action book, but when I make
the get() call below:
ClientResource resource =
is it possible to use the Template class in GWT code? It's not part of the
GWT edition, as far as I can tell. I want to use it to format the URI
template of the resource I'm communicating with.
-AndyD
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/using-org-restl
Still stuck on this. Any advice would be greatly appreciated!
-AndyD
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/500-error-from-ServerResource-doHandle-can-t-figure-out-why-tp6840764p6854792.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
Hi,
OK, Restlet newbie here, probably doing something dumb, but I've been stuck for
a while now and no amount of googling is helping :-).
Pretty simple situation. My restlet client is an android app, server is on
GAE. Both sides using 2.1M5. Right now I'm just trying to invoke a test GET
me
Thanks to Jerome, I got this working with 2.1, using a workaround for now:
Engine.getInstance().getRegisteredClients().clear();
Engine.getInstance().getRegisteredClients().add(new
HttpClientHelper(null));
--
View this message in context:
http://restlet-di
Update... based on some searching on StackOverflow, I found a tip to add the
line:
Engine.getInstance().getRegisteredConverters().add(new
JacksonConverter());
However, this had no effect.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Sample-Serli
Hi,
I'm having trouble getting the version 2.1 serialization sample Android
client working. It works when I use the 2.0.8 version of Restlet for
Android, but not when I use the 2.1M5 (or M4) version, regardless of whether
I use
cr.setRequestEntityBuffering(true)
or whether I comment it out (I have
39 matches
Mail list logo