I am going to copy this to the java forum, I didn't know there was one, sorry for the cross posting.
On Dec 16, 11:47 pm, derkent <[email protected]> wrote: > Is there any restriction or problem using the google app engine > without a browser? > > I am having a problem programmatically connecting to the app engine. I > could be easily doing something wrong, but I presume as long as the > Client uses a Asynchronous Request it should be able to work. > > However I seem to be do something wrong. The request doesn't get > mangled correctly into the RPC protocol. > > Does anyone have any pointers? Thanks a million. > > This is what I am doing in Java using Jetty (the greet servlet works > fine with a browser): > > String url = "http://localhost:8888/appengine/greet? > gwt.codesvr=192.168.1.33:9997"; > > HttpClient client = new HttpClient(); > client.setConnectorType(HttpClient.CONNECTOR_SELECT_CHANNEL); > try > { > client.start(); > } > catch (Exception e) > { > throw new ServletException(e); > } > > // create the exchange object, which lets you define where > you want > to go > // and what you want to do once you get a response > ContentExchange exchange = new ContentExchange() > { > // define the callback method to process the response when > you get > it back > protected void onResponseComplete() throws IOException > { > super.onResponseComplete(); > String responseContent = this.getResponseContent(); > System.out.println(responseContent); > // This line never fires > } > }; > > exchange.setMethod("POST"); > exchange.setURL(url); > exchange.getRequestFields().add("Content-Type", " > text/x-gwt-rpc; > charset=utf-8"); > > // start the exchange > client.send(exchange); > > This is the error I am getting: > java.lang.IllegalArgumentException: encodedRequest cannot be empty > at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:228) > at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall > (RemoteServiceServlet.java:186) > at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost > (RemoteServiceServlet.java:224) -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
