getVersion()
response = api.getVersion();
/** Procesar la respuesta según corresponda */
// comprobar si la respuesta es satisfactoria o no
if(response.getStatusCode() == Response.STATUS_SUCCESS)
{
System.out.println("getVersion call processed with no warnings or errors");
System.out.println("API Version:" + response.getApiVersion(););
}
else if(response.getStatusCode() == Response.STATUS_WARNING)
{
System.out.println("getVersion call processed with a warning");
}
else
{
System.out.println("getVersion call processed with an error");
}
// Para los errores, deben aparecer mensajes de aviso explicando por qué
if(response.getStatusCode() != Response.STATUS_SUCCESS)
printDetailMessageOfWarningOrError("getVersion",
response.getAdvisoryMessages());
Copyright IBM Corporation 2014. All Rights Reserved.
|