public void onSubmitComplete(SubmitCompleteEvent event)
{
// parse the results
String results = event.getResults();
RpcResponse response = RpcResponse.parse(event.getResults());
if (response != null)
{
logEntry.logResponse(ResponseType.Normal, results);
// check for error
RpcError rpcError = response.getError();
if (rpcError != null)
{
if (rpcError.getCode() == RpcError.METHOD_NOT_FOUND)
{
requestCallback.onResponseReceived(
new Integer(CREDENTIALS_UPDATE_UNSUPPORTED));
}
else
{
requestCallback.onError(new RemoteServerError(rpcError));
}
}
else // must be a valid response
{
Bool authenticated = response.getResult();
if (authenticated.getValue())
{
requestCallback.onResponseReceived(
new Integer(CREDENTIALS_UPDATE_SUCCESS));
}