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.

2 Responses to “PHP / GWT RPC Tutorial”

  1. Jason Ostberg Says:

    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) {
    }
    });

  2. Erik Says:

    I had Jason uncomment the DeferredCommand section in ServerComm.java in the sample code and it took care of the issue.