Hi Jerome,
thanks you're absolutely right of course.
I added this lines to my web.xml and now it demands a certificate when
accessing the Rest-services:
security-constraint
web-resource-collection
web-resource-nameHTTPS Rest/web-resource-name
Hi!
I want to secure my Rest-Application on the Google App-Engine by only
allowing calls via HTTPS/SSL.
Because i didn't really know how to do this, i first removed the
HTTP-Connector from the list of available connectors in my web.xml.
servlet
servlet-nameRestletServlet/servlet-name
Hi!
I have a ServerResource that looks like this:
@Post
public Representation store(Product product) {
ProductService service =
MyThreadLocal.getServiceFactory().productService();
if (null == getRequestAttributes().get(id)) {
Thierry Boileau wrote:
Hello Sebastian,
you can also simplify your code as follow:
import org.json.JSONException;
import org.json.JSONObject;
import org.restlet.resource.Get;
import org.restlet.resource.ServerResource;
public class TestJsonServerResource extends ServerResource {
Hi,
attached is a very simple code.
I ran it on the local gae environment.
When i create the JsonRepresentation, it's JsonValue is empty...
That's not the same behaviour as in my other project, but maybe that's
somehow causing the error.
Best Regards,
Sebastian
Sorry for posting multiple responses...when i have time i'll try to create a
simple sample Project.
Today i debugged further into it, and it just gets stranger.
Until JsonRepresentation.write(Writer writer) all seems fine.
writer.write() is called with the right JsonText at line 322.
But after
wrote:
Regarding you second issue - my code looks slightly different and provides
valid json representation back. Maybe this works for you as well.
Actually I'm not creating the JSONRepresentation by myself but just
provide pure Java Objects back. The JSON-serialization is then handled by
Thierry Boileau wrote:
Hello Sebastian,
could you send the client code (java, gwt or curl?) It should precise the
client preferences.
If you have difficulties to set the preferences, could you try to add this
query parameter to the resource's uri? : media=json
best regards,
Thierry
Thierry Boileau wrote:
Hello Sebastian,
What do you mean by sending the client code?
I meant, either the line of codes of the java client, or the curl command
line.
As I really don't realize what is wrong, can you provide a sample eclipse
project?
Best regards,
Thierry Boileau
Hi!
Im having some problems getting the First Application example to run.
At first there was this
http://restlet-discuss.1400322.n2.nabble.com/IncompatibleClassChangeError-with-ConcurrentMap-tp6393712p642.html
issue .
After upgrading the libs, i got this Error:
[WARN] No available client
Hi,
according to the
http://www.restlet.org/documentation/2.0/jee/ext/org/restlet/ext/servlet/ServerServlet.html
docs it's org.restlet.ext.servlet.ServerServlet
--
View this message in context:
I had the same problem.
If i remember correctly, i solved it by changing the Constructor of my
Custom scheme.
As you can see, the restlet-Engine automatically adds HTTP_ to your Scheme
name and searches the registered Schemes only for that name. Don't know if
its a bug or intended this way.
Either
Maybe you could try returning a JSONArray containing all the JSONObjects in
the List instead.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Error-in-returning-a-list-on-Get-Method-tp6412562p6435097.html
Sent from the Restlet Discuss mailing list archive at
Hello Thierry,
Thanks, i haven't tried it yet but im sure it will work now.
However, since i added the new Snapshot to my Project, i don't get any
JsonObjects back with an JsonRepresentation...
My methods all look like this:
@Get
public Representation get(){
JsonRepresentation response = new
When your Method looks like this:
@Post(json)
public void doPost(){...}
you have to set the Content-Type header of your Request to application/json
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/error-415-while-posting-json-tp6418843p6427317.html
Sent from the
Nobody got an idea?
It's also odd that i can run the testGWTRestlet-2.0 project without
problems.
Maybe because of the launch-Script provided with it?
--
View this message in context:
It should be possible if you have a proper Token and know exactly how to
provide it (in the Headers, the Post-Body...) to your resource.
Depends on the Provider i guess.
You can also look at the http://tools.ietf.org/html/draft-ietf-oauth-v2-16
OAuth-Specification
for further information.
--
17 matches
Mail list logo