Restlet POSTing JSON to Appengine error

前端 未结 2 657
孤独总比滥情好
孤独总比滥情好 2020-12-11 10:23

We have a small app with Restlet on the GAE server and GWT and Android clients. Restlet serves GWT-serialized replies to GWT clients and JSON to Android clients.

All

2条回答
  •  醉话见心
    2020-12-11 11:18

    Just to let everybody know: I managed to get GAE+Restlet+JSON+GWT working after much fiddling. The process was really chaotic (reminded me of days programing for the Win32): I was just changing settings until it started working.

    The problem that I was having is:

    1. It was serving the wrong representation (JSON, XML, GWT) to the wrong clients. Later it turned out that I had to pay attention to the order of methods inside the class. WTF??
    2. I could not get it to work on sub-path, e.g. /rest/*.

    I'm not going to use Restlet for the following reasons (hint to authors):

    1. Documentation is scarce, inaccurate and sometimes contradictory (explaining thing in different ways in different parts of documentation).
    2. Configuration is not standard JAX-RS. I know they have an option to configure it as JAX-RS, but all examples in docs are not based on this.

    Since then I switched to Jersey.

提交回复
热议问题