requestBuilder.setCallback(new RequestCallback() {
@Override
public void onResponseReceived(Request request, Response response) {
if(200==response.getStatusCode())
{
Dialog dialog = new DialogXML().unmarshall(response.getText());
callback.onSuccess(dialog);
}
else
{
callback.onFailure(new RuntimeException("Failed to load dialog: HTTP "+response.getStatusCode()));