Hey - bit stumped on what to do here.
We've deployed a restlet based app on EC2 behind Amazon's new Elastic
Loadbalancer.
When I access the app directly on port 8080, my app works as expected. When I
access the app through the loadbalancer on port 80, which in turn is mapped to
my app on p
Guys, Call me dense, but I'm having a hard time figuring this bit out. My goal
is to have a server with a rest interface that accepts messages from a fielded
app. These messages would be thrown into a AWS SQS queue and processed
elsewhere.
I managed to put something together based on the exampl
Jackson has been released as 1.0
http://jackson.codehaus.org/Tutorial
I wrote a simple reflection based Json Representation for Jackson.
public class JsonReflectionRepresentation extends StringRepresentation {
public JsonReflectionRepresentation(Object jsonable) throws
ResourceExceptio
Hi Stephan,
thanks for your reply, the problem is that entity is null?
I can get: getRequest().getEntityAsText();
But I thought that
public void methodName(XmlRepresentation entity)
Would include the xml?
Regards
Christian
--
http://restlet
Just some extra info:
The server also gives following warning:
May 19, 2009 4:53:07 PM org.restlet.service.ConverterService toObject
WARNING: Unable to find a converter for this representation :
org.restlet.representation.inputrepresentat...@aa7dbc
So maybe I need to implement some ConverterSe
How can I restrict following Restlet entry in console using log4j.properties? I
don’t want to modify my java code.
May 18, 2009 5:39:38 PM com.noelios.restlet.LogFilter afterHandle
INFO: 2009-05-18 17:39:38127.0.0.1 - localhost 8080 GET
/auth/accounts/9862/preferences/2
I wasn't aware of ServletConverter but from quick experimentation, it seems to
have the same mapping problem as ServetServlet.
i.e. it adjusts the resource base and root reference objects and this logic
seems to only work when the fronting servlet itself is mapped to /* and not
just /resource/*
I've managed to get a simple webapp going with the Guice 2 + Restlet 2 + JSP
unholy trifecta. (I believe Leigh Klotz was also trying to do the same thing).
It's based on your approach, Tim, with a custom Finder to inject/create
resources with Guice and on Philippe Duchesne's approach to get JSP
Hi,
I have implemented a service based on JAXRS and JSON.
I have issue with POSTing a JSON object from client to the sever. Always the
response status is 415.
Here is the client code:
final Request request = getAuthenticatedRequest(Method.POST,
getOrganizationsUri
I am attempting to get the 'get variable' out of a reqeust. The url is
something like www.example.com/?var=asdf
I try String var = (String) request.getAttributes().get("var);
This does not work. How do I go about doing this?
--
http://restl
An exception is thrown when using client.post() inside a jax-rs method
Source code:
http://pastebin.ca/1420694
without the call, the jax-rs method works fine.
when launching the client.post() method from a main no exception is thrown.
Stacktrace Using grizzly connector:
http://pastebin.ca
Hi all,
I'm looking for a possibility to easily use proxy support for Client HTTP calls
with Restlet. The "normal" approach using
System.setProperty("http.proxyHost","proxy");
System.setProperty("http.proxyPort","8080");
does not work. I already searched this discussion board
Hi,
I'm getting a similar error using JsonRepresentation.
Thanks,
Gabi
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2189743
I'm not sure if I am approaching the problem incorrectly, or I have found a
bug. I am using the 1.2 snapshot from May 5 2009.
I have a restlet client process and an associated restlet based server. The
resources are all guarded using HTTP_DIGEST authentication. I have setup the
client to automa
Excuse me if this is a duplicate, my first post did no appear to go through.
I'm not sure if I am approaching the problem incorrectly, or I have found a
bug. I am using the 1.2 snapshot from May 5 2009.
I have a restlet client process and an associated restlet based server. The
resources are al
is perform new scheme possible? I have problems with HTTP_BASIC...
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2082679
GENERATED_KEYS is an unsupported JDBC feature in oracle.
oracle.jdbc.OracleDriver works with java.sql.Statement.execute(String sql), but
would instead throw exception with java.sql.Statement.execute(String sql, int
autoGeneratedKeys) , and unfortunately that's used in
com.noelios.restlet.ext.jd
Hi Thierry
Source for the revision of the class where the problem occurred can be found
here:
http://fisheye.agilos.org/browse/~raw,r=36/Agilos/zendesk-jira-plugin/trunk/src/main/java/org/agilos/jira/zendesk/NotificationDispatcher.java.
The class is part of a JIRA plugin, so the full classpat
Dear all;
How are you?
I am trying to develop web service for geopolitical ontology.
I created one resources like
ws/neighbors/{ISO3} --> show all neighbors including 6 language translations,
by given country ISO3 code
i.e. ws/neighbors/ken --> show all neighbors including 6 lanuage translati
My bad,
I did not read carefully the docs. My problem is that I do not pass any
Enroller instance to the application.
Gabi
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2055713
Hi,
I'm a newbie trying to use Restlet in my project.
I'm trying to protect a resource setting a guard. I'm using the MemoryRealm
model to secure the resource. I'm adding a new Organization, Group, User and
also map the user defined in the component to an application role. I'm also
using a clas
Hi,
I'm trying to understand why the GwtShellServletWrapper doesn't start in hosted
mode. It seems to be some classloader problems...
Anyway, I found something that I'm feeling it's not right
in org.restlet.engine.Engine.java, in the loadClass(String className). In line :
result = Class.forNa
I'll do a few more test and have the changes posted.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1995122
Thanks. I'll try that.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1978079
Hi,
I have the org.restlet.gwt 1.2-SNAPSHOT and I'm using it only for the client
capabilities, i.e. the server is in another project so I don't need the
org.restlet.ext.gwt for the GWT Shell.
The problem is that I have to build the jar with the source files because GWT
complains that could no
Hi Thierry
Thanks for your answers! I'm afraid I got some things wrong.
> the redirection is made transparent for the client.
That's what I didn't realise before. Actually I had links like
instead of and of course the starting slash cuts the URL down to
the host name.
Looking further into the
Hi Thierry
Best thanks also for this hint. It works perfectly!
Matt
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1977072
By using latest snapshot, the first issue was fixed as it was pointed out by
Jerome.
And the second question worked in the snapshot version too by following
Thierry's code.
Thank you both for the prompt replies!
Derek
--
http://restlet.tigri
We where able to finally narrow down the issue to firewall rules that can
causing some part of the code to fail.
However the last question, should we remove the following code?
esponseHeaders.add("Cache-Control", "no-cache");
responseHeaders.add("Pragma", "no-cache");
responseHeaders.add("Exp
Hi,
Using that code for json output with jax-rs :
@GET
@Produces("application/json")
public String getJson() {
return "{\"id\":1,\"name\":\"rabbit\"}";
}
will produce :
---snip--
18
{"id":1,"name":"rabbit"}
0
---snip--
These extra lines (18
Hi,
Using that code for json output with jax-rs :
@GET
@Produces("application/json")
public String getJson() {
return "{\"id\":1,\"name\":\"rabbit\"}";
}
will produce :
---snip--
18
{"id":1,"name":"rabbit"}
0
---snip--
These extra lines (18
Hi Jerome
> Shouldn't your pattern be something like "https://www.{baseUrl}{rr}";?
Ok, I didn't know I can add the baseUrl attribute directly like this. But this
doesn't really change the original problem: A redirector with pattern
"https://www.{baseUrl}{rr}"; attached to
"http://mysite.com/pa
In an application's createRoot method I have:
Guard guard = new ExtendedGuard(...);
Router router = new Router(getContext());
router.attach("{itemId}", ItemResource.class);
guard.setNext(router);
return guard;
Now I would like to access itemId from within the ExtendedGuard class. However,
itemId
Many thanks for your reply!
I will try to send a basic demo of using jaxb soon.
Regards,
Martin
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1928289
Restful Web Services
Chapter 8, URI Design:
"When designing URIs, use path variables to separate elements of a hierarchy,
or a path through a directed graph. Example: /weblog /myweblog/entries/100 goes
from the general to the specific. ...
Use punctuation characters to separate multiple pieces
This works for me, too.
Forgot to mention that my problem occurs on the server-side!
Olivier
> Hello,
>
> This is working for me:
>
> Button getXMLButton = new Button("Get XML");
> getXMLButton.addClickListener(new ClickListener() {
> @Override
> public
Am sorry to be posting something not related to Restlet actually.
there is one resource by the URI
http://www.abcd.com/product1/feature
there is another URI by the pattern
http://www.abcd.com/product2/feature
Now if i want to a URI to identify both of them then which one is correct?
http://www.ab
At the root of my web service there is no resource attached - so it just
returns a 404 error - nothing is returned from the GET response - what would
you commonly have at the root of your web application - a nice HTML human
readable page explaining that you are at the home of the webservice and
I'm seeing errors in my logs whenever I return a 304 (not modified response)
that have the following message: "Responses with a 304 (Not modified) status
can\'t have an entity. Only adding entity headers for resource..."
I've confirmed that my resource is not returning an entity, in fact it looks
Hi
I'm using Redirector to proxy Requests from HTTP to HTTPS but I want to forward
Requests from a sub URL to an external URL and all paths should be relative to
a given path. For example:
http://www.myapp.com/path/example.com/morepath/XYZ
should be redirected to (in dispatcher mode):
https://ww
Hi, i'm a student and i'm new of RESTlet. Can you help me about this problem?
How can I allow or not the access to resources or posting of this ones in base
to user that require it? How can I, one time the specific client is
authenticated, filter allowed operations?? Is it possible to make to do
yes...it does not have acceptrepresentation method. But then why it has been
implemented as PUT rather than POST? User creation should always be POSt,
right? PUT is always used for Updates, right??
Thanks!
--
http://restlet.tigris.org/ds/viewM
Hi Jerome,
Well, I think I solved this one. Here is what happened :
- I had an exception within the XML parsing to persist the resource (sorry I
did not include this part, I thought it was not the source of the problem)
- This exception was caught by the catch block, and rethrown as a
ResourceEx
Hi
Could anyone give me some advice how I could implement such a Filter or
ConnectorService for hibernate? The main problem is: How can I get the
EntityManager that I created in the Filter at some other point?
Now I'm using auto-generated JPA Controller classes form NetBeans but this
leads to
Hi,
I changed the Bookmark example
C:\restlet-1.1.4\src\org.restlet.example\org\restlet\example\book\rest\ch7\ApplicationTest.java
from Put to Post in putUser method as shown below:
public static void putUser(String userName, String password,
String fullName, String email) {
I'm not sure! I guess there is a solution but I haven't tested it yet.
the solution I see is to override Guard#doHandle(Request,Response) e.g. if
authenticate returns AUTHENTICATION_MISSING I can redirect the client to the
external website.
Matt
Forgot to attach the app log, the line "INFO: Routes: /sample/locations" it's
added by me and actually checks that the router used by the application
contains a route for "/sample/locations", the request is for "/sample/locaions"
but still getting a 404
[INFO] Started Jetty Server
13-abr-2009
Hi Jerome
Yes, I was able to solve this. It was entirely my fault :( I forgot to add
libraries for the HTTPS client. RESTlet even printed an error message which my
eyes refused to see ;)
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId
Hi, i need suggestion. I have to implement a multi-side RESTlet architecture to
exchange message/resource between pharmacies and suppliers, and between
suppliers and agents. It implicates thet in the suppliers side, there are
resources POSTed or PUTted by booth pharmacies and agents and some res
After a bit of experimentation I have managed to get a Restlet/Freemarker stack
running on GAE.
The basic steps I took were :
1. Modify ServletConverter and ServletContextAdapter as detailed below.
Basically this means replacing the calls to new ServletLogger with
Logger.getLogger e.g. in the
Hi everybody,
I'm trying to figure out how to handle a PUT on a resource. I have overriden
storeRepresentation method, so that it creates a new entity, and replies with
the passed entity. Here is the code :
@Override
public void storeRepresentation(Representation r) throws ResourceExce
Hi Jerome,
Can you please be more specific?? I alerady looked at the below link which
you provided, but I still couldn't understand which part exactly accepts the
request XML.
My request XML would be in following format:
Test
Foo
Now, I need to accept this input & parse it usin
Hi everybody,
I am using the JAX-RS extension for developing my application.
I would like to specify the accepted formats using query parameters because the
client I am using is not able to send accept headers.
I did this in the JaxRsApplication create root method:
getTunnelService().setEnable
Hello,
I am using restlet 1.2M2 in the TomCat 6 web container. I am trying to create
multiple Restlet applications and define different URI patterns that map to
each one. I tried to do this following all the Restlet examples posted and it
seems that all the examples show how to handle only one a
hi, some day ago i posted a a problem.
"Hi i'm an italian student and i have to plan a restful architecture using
RESTLET.
The architecture have to implement a B2B message exchange in xml format powered
by GS1 XML.
-My problem is to understand how makes the client thet have to get or post a
r
"what is the best URI to publish the descriptor?" is not a problem for me. In
my application all client may know this URI. The problem is thet each side of
architecture have a client and a server restlet and in a server can exist
resources PUTted by itself (if it's possible to do) and the client
Greetings,
I am new to Restlet and am not sure how to solve this problem, or if Restlet is
capable of doing what I am after:
I need to be able to generate a PUT request that has a large (500mb+) amount of
text. The text its self is generated on the fly (not from a file on disk).
I then need to
I've been having trouble getting Spring to play nice with Restlet (I'm
experienced with Spring, a newbie with Restlet, so please bear with me!). Using
Spring 2.5.6 and Restlet 1.2-SNAPSHOT.
I want to define a resource called "uniq" and map /uniq to my UniqResource bean
(extends Resource). Simpl
I've been having trouble getting Spring to play nice with Restlet (I'm
experienced with Spring, a newbie with Restlet, so please bear with me!). Using
Spring 2.5.6 and Restlet 1.2-SNAPSHOT.
I want to define a resource called "uniq" and map /uniq to my UniqResource bean
(extends Resource). Simpl
for a given Resource R, i want it accessible through these links:
R.html : returns html representation for resource R
R.xml : returns xml represenation
R.pdf : returns pdf representation
apart from this i want to keep the behaviour of setting mime types in the http
protocol and get the correspond
how to create a client that asks for the xml representation of a resource i.e.
how to set the media type for a given request.
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1528788
Hi i'm an italian student and i have to plan a restful architecture using
RESTLET.
The architecture have to implement a B2B message exchange in xml format powered
by GS1 XML.
-My problem is to understand how makes the client thet have to get or post a
resource to know resource's location and
it's all right. Now it's all working. Thank you for help.
Endrio
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1505823
Do anybody know where can I find tutorials to understand how to implement
simple resources with persistence through JDBC (ex: MySQL, ...) ?
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1508825
Thanks for the quick answer. That gave me what I needed.
-Robin
> Hi Robin,
>
> take a look at
> http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/130-restlet.html .
>
> @Jerome, Thierry: What about logging also the api call to use for set
> the value?
>
> best regards
> Stephan
>
Hi i'm an italian student and i'm starting with Restlet. As first example to
understand how things work, i followed this ones:
http://danilogurovich.wordpress.com/2008/09/23/a-simple-restlet-demo-application/
I included all the library listed in the page.
I copied all the 6 class in Myeclipse 7
Hi, I am quite new to Restlet, I am trying to configure server connector as
described in http://www.restlet.org/documentation/1.0/connectors
However, line
server.getContext().getParameters().add("useForwardedForHeader", "true");
throws me a nullpointerexception because context is null. I am using
Hello -
When running through Apache (and the weblogic plugin), the urlencoding that
we're originally setting up is getting lost.
So /bob/joe%20%7C%20sam/pete
becomes
/bob/joe | sam/pete
On it's way through apache from the browser to the restlet.
As a result, the URI pattern isn't matching,
Hello,
I'm using a Redirector in MODE_DISPATCHER. I can easily use it to forward HTTP
requests that come from the client to another URI, e.g.:
http://localhost/forward -> http://www.example.com
What I'm trying to do now, is to forward an HTTP request to an HTTPS URI, e.g.:
http://localhost/forwar
Hi All
I'm prototyping an application which will use user and server certificates
extensively: every client request and server response must be ciphered and
digitally signed.
The ciphered part is easy with https, but ¿how do I accomplish the second part?
I'm a bit confused and I think of XML-D
Hi
I'm trying to use an existing EJB of mine in a restlet context. I'm quite noob
in restlets so I'm not even sure this is supposed to work.
When using @EJB annotation to inject the ejb reference I get a null-pointer.
The EJB is deployed properly on my Glassfish application server, and the
refer
-Our problem is to understand how makes the client thet have to get or post a
resource to know resource's location and therefore the final url to use in the
GET or POST HTTP messages to refer to the correct locations.
--
http://restlet.tigris.o
thank you Jerome Louvel and Thierry Boileau for help!
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1373791
Hi Rob,
Thanks for such a fast answer!
After reading the discussion, I both tried to set a property on the client
Request, and the server Response, with:
Map map = new HashMap();
map.put("Cache-Control", "no-store");
// server side
response.setAttributes(map);
// client side
request.setAttribu
Hi all,
I have an restlet application which is working very well running standalone.
But I need to deploy it in a Tomcat. When I try to access my app I always get
the following screen:
Unable to return the xml representation.
You can get technical details here.
Please continue your visit at o
Jerome,
Thank you for your response, yes I did try passing an instance of the
ValidationEventHandler to the JaxbRepresentation constructor but the callback
method was not invoked. I will continue to experiement...
Thank you
Adnan
--
http://re
Thanks Thierry! You might consider adding this info to the guide, because it
wasn't clear to me where Guards lived in the chain of calls. Thinking of the
Resources and Guards as a tree helped make it clear.
One follow-up question: how can I have a Guard only care about certain
requests? For e
thanks
Is there a jar file that contains only the restlet-gwt classes?
the files in http://www.restlet.org/downloads/ have about 15M!!
Why are they so big? do they have all the engine to run restlet?
--
http://restlet.tigris.org/ds/viewMessage.d
Thanks for the help Stephan. You got me started on a journey of adding
libraries. In the end I had to include the following before the example would
run:
com.sun.jaxb.jar
javax.activation.jar
javax.mail.jar
javax.ws.rs.jar
javax.xml.bind.jar
org.apache.commons.fileupload.jar
org.json.jar
org.r
Hi,
I'm trying to get my head around jax-rs and I'm not sure how to set a catch-all
route for my site. In restlet I would do this:
final Router myRouter = new Router(getContext());
myRouter.attachDefault(CatchAll.class);
Is there a way to do the same thing in jax-rs?
T
---
Can anybody post Restlet 1.1.3 with JAXB extention example with Java 6. we
are having some troubles to get into work.
Thanks
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1318007
Hello,
We're using Restlet version 1.2M1 and using the JaxbRepresentation class, we're
somehow unable to get the schema validation to work. I'm basically just trying
to validate when unmarshalling the request XML during a post request.
The Object is successfully unmarshalled into it's corrspond
It was actually much simpler than that :)
Wen deployed as war the application is exploded in to the windows temp folder
that has spaces and getResource() returns URLEncoded url so before using it in
file it needs to be URL decoded.
Your code worked just fine as well, thank you!
I've read the tutorial, but it doesn't answer all my questions.
1) Where do I set the Guard? I only need it on a couple of resources, so I was
thinking I should create it in the constructor for the Resource. Does this
seem logical/reasonable?
2) The example shows a call to getSecrets().put().
Hi Jerome,
test.txt is only a few characters long:
echo "test" > test.txt
Olivier
> Hi Olivier,
>
> This might be related to chunked encoding and persistent connections that
> are typically used in HTTP 1.1 communications.
>
> I've entered a defect:
>
> "Slow responses with RESTClient"
> htt
HttpClientConverter is the only code that required Callback so you will need a
new class or have it call back to itself.
It would also help in a future api change to allow for an easy way to set a
unique ID per callback so you can share listener interface among multiple
calls. This is the same
Hi Jerome.
I have been using the net HTTP client. I did some looking into the source
code, and I've found that the read timeout is set in the URLConnection class.
This means that this is not a restlet issue, but instead it's an issue with the
URLConnection class (or more likely, I'm doing s
Can someone tell me why the Bundle-Version property for each of the artifacts
in the maven2 repository(http://maven.restlet.org/) are not correctly stating
the maven version.
For example, the manifest for 1.2-SNAPSHOT AND 1.2-M1 both state that the
Bundle-Version is 1.2. This is not the actu
I am looking for good ideas for testing RESTful web services built using
Restlet. We have done obvious: JMeter, JUnit, and some integration testing.
I'd like more automated tools that testers could use (possibly with the help of
developers) that specifically address REST. The approaches I menti
I wanted to say a quick thanks for an excellent API/toolkit. I had no trouble
getting XML data via REST calls integrated into our GWT application.
Not a big fan of innerclasses but they are convenient given the examples of
defining the callback class for a particular REST call. The problem I am
There are hierarchies which i need to expose.
E.g. foo.com/1/2/3/data
foo.com/5/6/data
foo.com/5/7/8/9/data
foo.com/0/10/11/12/13/14/15/data
Different hierarchies are of differing depths which can be known only at
runtime. Also there are numerous hierarchies.
My first question is whether this is
501 - 591 of 591 matches
Mail list logo