Call php from GWT...hey I am working on the same thing...
here are two options...
1.

            RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
"http://localhost/JSONTEST/index3.php?id="; + data.getIdentifier());

            try {
              Request response = builder.sendRequest(null, new
RequestCallback() {
                public void onError(Request request, Throwable exception) {
                  // Code omitted for clarity
                }

                public void onResponseReceived(Request request, Response
response) {
                  // Code omitted for clarity
                }
              });
            } catch (RequestException e) {
              // Code omitted for clarity
            }


2.
        if(!HTTPRequest.asyncGet("
http://localhost/JSONTEST/index1.php?tosearch=3&id="; + new Date().getTime(),
new JSONResponseTextHandler())) {
            Window.alert("Error accessing index1.php");
        }

    private class JSONResponseTextHandler implements ResponseTextHandler {
        /*
         *  (non-Javadoc)
         * @see
com.google.gwt.user.client.ResponseTextHandler#onCompletion(java.lang.String)
         */

        public void onCompletion(String responseText) {
            /*
             *  When the fetch has been completed we parse the JSON response
and
             *  display the result
             */
..
.
.
.
. write your code here...
            } catch (JSONException e) {
                System.out.println("Exception" + e.toString());
            }

        }


Lemme know if you face any problem in this...

Cheers,
Amit Dhingra

On Mon, Sep 22, 2008 at 9:55 PM, cloclo <[EMAIL PROTECTED]> wrote:

>
> Hi everybody,
>
>   I'd love to be able to call a PHP web service from gwt tool
> library.
>
>   Ususally it's rather easy to call  from java a PHP web webservice.
>
>  ...
>             import org.apache.axis.client.*;
>
>            Service service = new Service();
>            Call call = (Call) service.createCall();
>
> ... etc
>
>
> But the gwt compiler don't accept that: the error message  is:
>
> -----------------------------start message------
>
> Removing units with errors
>   [ERROR] Errors in 'file:/C:/Documents%20and%20Settings/
> claude_antidot/My%20Documents/java_project/WebApplication1/src/java/
> org/yournamehere/client/MainEntryPoint.java'
>      [ERROR] Line 59: No source code is available for type
> org.apache.axis.client.Service; did you forget to inherit a required
> module?
> Computing all possible rebind results for
> 'org.yournamehere.client.MainEntryPoint'
>   Rebinding org.yournamehere.client.MainEntryPoint
>      Checking rule <generate-with
> class='com.google.gwt.user.rebind.ui.ImageBundleGenerator'/>
>         [ERROR] Unable to find type
> 'org.yournamehere.client.MainEntryPoint'
>            [ERROR] Hint: Previous compiler errors may have made this
> type unavailable
>            [ERROR] Hint: Check the inheritance chain from your
> module; it may not be inheriting a required module or a module may not
> be adding its source path entries properly
> [ERROR] Build failed
>
> ------------------------------stop message-----
>
> Does anybody now what the gwt is expexcted for or does anybody be able
> to show me a link to sample code doing that?
>
>   a call from java gwt's generated code to a php web service.
>
> Thank you for any help or suggestion.
>
> Claude.
> [EMAIL PROTECTED]
>
>
>
>
> >
>


-- 
Warm Regards,
Amit Dhingra

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to