Tereno
7 Jul 2008, 2:45 PM
Hi there,
I am wondering if someone could point me to examples of utilizing web services that return JSON strings back as well as XML and the normal SOAP.
Currently for JSON, I'm using the GWT like this:
private class JSONResponseTextHandler implements RequestCallback {
public void onError(Request request, Throwable exception) {
//error
}
public void onResponseReceived(Request request, Response response) {
String responseText = response.getText();
try {
JSONValue jsonValue = JSONParser.parse(responseText);
label2.setText(jsonValue.toString());
} catch (JSONException e) {
label2.setText(responseText);
}
}
}
Is there any other way to do it using GXT?
Thanks
I am wondering if someone could point me to examples of utilizing web services that return JSON strings back as well as XML and the normal SOAP.
Currently for JSON, I'm using the GWT like this:
private class JSONResponseTextHandler implements RequestCallback {
public void onError(Request request, Throwable exception) {
//error
}
public void onResponseReceived(Request request, Response response) {
String responseText = response.getText();
try {
JSONValue jsonValue = JSONParser.parse(responseText);
label2.setText(jsonValue.toString());
} catch (JSONException e) {
label2.setText(responseText);
}
}
}
Is there any other way to do it using GXT?
Thanks