I'm using HttpRequests via RequestBuilder/Request on server 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 am trying to resolve that.can you know that how to resolve that error
My code in server is:
public String Addcontact(Contact contact) throws Exception
{
System.out.println("The addcontactserver is"+contact);
connection con =new connection();
String response="";
String firstname=contact.getFirstName();
String lastname=contact.getLastName();
String emailaddress=contact.getEmailAddress();
String
url=("http://localhost:8080/contactservices/rest/WebService/ADContacts");
JSONObject parameters = new JSONObject();
parameters.put("firstname", contact.getFirstName());
parameters.put("emailaddress", contact.getEmailAddress());
parameters.put("lastname", contact.getLastName());
System.out.println("The param is"+parameters.toString());
RequestBuilder builder =new
RequestBuilder(RequestBuilder.GET,URLEncoder.encode(url));
builder.setHeader("Content-Type", "application/json");
builder.setHeader("Accept", "application/json");
builder.setTimeoutMillis(15000);
System.out.println("the builder
is"+builder.getUrl()+','+builder.getHTTPMethod());
builder.sendRequest(parameters.toString(),new RequestCallback()
{
public void onError(Request request, Throwable e)
{
Window.alert(e.getMessage());
}
@Override
public void onResponseReceived(Request request, Response response) {
// TODO Auto-generated method stub
Window.alert(response.getText());
}
});
return response;
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.