PHP / GWT RPC Tutorial
I’ve posted a new tutorial here documenting a string-based approach to an RPC mechanism. This is not the ‘real’ GWT wire protocol. Rather it is a stronger and more convenient method extended from the previous tutorials. If you are passing form data between a PHP server and a GWT client, this may help simplify your life.
April 11th, 2007 at 4:09 pm
Hi, im using your ServerComm.java/UsingRPC.php code to send out an email.
I use the getName() to return the contents of the email to the server with the below code. It works fine, but the only problem is that it calls UsingRPC.php about 3500 times every time a user submits.
Any idea why it would call it so many times? It creates undesirable server load.
ServerComm.requestUpdate(”GetPDF”, new ServerComm.ServerData() {
public String getName() {return superStringBody.getText();}
public String getValue() {return “”;}
public void onSuccess(Object o) {
confirmLabel.setText(”Success”);
sent = 1;
action.setText(”Finished. You will recieve a record via Email.”);
//centerStack.setStepUpdate(9);
}
public void onFailure(String errMsg) {
}
});
April 13th, 2007 at 2:01 pm
I had Jason uncomment the DeferredCommand section in ServerComm.java in the sample code and it took care of the issue.