I'd imagine that the implementation uses the browser for most of this work (so isn't available on the server)... If you really want to do it this way you might be able to hack it with htmlunit (like the unit tests) but you would probably be much better off using a more normal server side (JVM) approach.
On May 6, 4:07 pm, Paolo Quadrivium <[email protected]> wrote: > I'm using HttpRequests via RequestBuilder/Request on client side and > everything is OK. > I tried to move this operation on server side and at run-time I get > the following error: > > java.lang.UnsatisfiedLinkError: > com.google.gwt.xhr.client.XMLHttpRequest.create()Lcom/google/gwt/xhr/ > client/XMLHttpRequest; > I'm using Eclipse. > What is missing? > Thanks in advance. > > My code in server is: > String url = "http://localhost:50000"; > String data = "Ciao Ciao"; > RequestBuilder builder = new > RequestBuilder(RequestBuilder.POST, > url); > > try { > Request request = builder.sendRequest(data, new > RequestCallback() > { > public void onError(Request request, Throwable exception) > { > // Couldn't connect to server (could be timeout, SOP > violation, etc.) > } > > @Override > public void onResponseReceived(Request request, > Response response) > { > // TODO Auto-generated method stub > > } > > }); > } catch (RequestException e) { > // Couldn't connect to server > } -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" 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-web-toolkit?hl=en.
