Hi,
I'm developing an online android native app with NetWeaver Gateway 7.4 SP10, SMP 3.0 SP07 PL02 and SMP 3.0 SDK SP08 PL01. I'm having trouble with the reading of error messages tables returned from ERP. In the image that I'm attaching, I show the structure of the standard message table, at the moment I'm only able to catch the "header" message (lead message), the one in yellow color, but I can only get that message, if the ERP is returning me several errors, I can't navigate through the structure, I can't get the innererror tag and catch the errordetail messages, that are the one that I need, the one in blue color int the attached image.
This is the code I use on Android to catch the header message:
try { //Executor method for reading an Entity set synchronously ODataResponseSingle resp = store.executeReadEntitySet(url, null); //Get the response payload ODataEntitySet feed = (ODataEntitySet) resp.getPayload(); //Get the list of ODataEntity entities = feed.getEntities(); } catch (ODataNetworkException e) { ODataResponseSingle oDataResponse = (ODataResponseSingle) e.getAdditionalInfo().getResponse(); ODataErrorDefaultImpl oDataError = (ODataErrorDefaultImpl)oDataResponse.getPayload(); Log.e("Error", oDataError.getMessage()); // oDataError.getMessage() value is the one in the image with yellow color, the message tag, I to get to the need the inner structure MensajesError error = new MensajesError(oDataError.getMessage(), mActivity); error.setError(oDataError.getMessage()); error.setmActivity(mActivity); throw new OnlineODataStoreException(e); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }
oDataError.getMessage() returns me the string in the message tag highlighted with yellow (the lead message), what I need is to get the tags in blue colors.
Does anybody knows how can I handle or get this message tags (the blue ones) from the OData SDK libraries, from Android? Maybe Claudia Pacheco can give me a light on this.
Best regards,
--
Ana Velásquez