Hi,
It's hard to tell. Is the printout of data related to 
value.getResponseData()?
What are the fields of User?
How does it fail? Is the user object not set?
If you step over it with a debugger is it set for a short while? 

On Monday, May 31, 2021 at 7:14:58 PM UTC+3 rdvg...@gmail.com wrote:

> Hi,
>
> I am trying to consume a webservice using the restful API. It correctly 
> returns the information I request:
>
> data => [{usuarioid=17, usuario=demo1, nombreempresa=Embutidora Nacional, 
> impuesto=7, menuid=1, dispositivoid=4, leehuella=1, imei=55555, correo=
> rube...@yahoo.com, nombre=Usuario Embutidos, radio=300, 
> fuenteinventario=A, permitecambiarfoto=1, iniciosesion=1, 
> contrasena=202cb962ac59075b964b07152d234b70, rangoinicio=100001, 
> rangofin=150000, secuenciaorden=100054, estado=A, 
> token=0a5b3d4a-5b8f-443d-af8e-cfb4100b71c4}]
>
> To consume I do the following:
>
> public static void login(Idioma idioma, String usuario, String contrasena, 
> final SuccessCallback<Usuario> onSuccess, final FailureCallback<Object> 
> onError) {  
>         Rest.get(SERVER_URL + 
> "blank_ws_autenticar/blank_ws_autenticar.php").
>                 acceptJson().
>                 queryParam("contrasena", contrasena).
>                 queryParam("usuario", usuario).
>                 getAsJsonMapAsync(new Callback<Response<Map>>() {
>
>                     @Override
>                     public void onSucess(Response<Map> value) {
>                         usr = new Usuario();
>                         PreferencesObject.create(usr).bind(); 
>                        * 
> usr.getPropertyIndex().populateFromMap(value.getResponseData())*;
>                         onSuccess.onSucess(usr);
>                     }
>
>                     @Override
>                     public void onError(Object sender, Throwable err, int 
> errorCode, String errorMessage) {
>                         onError.onError(null, err, errorCode, 
> errorMessage);
>                     }
>                 });
>     }
>
> I cannot pass the information through the property "populateFromMap"
> What is the correct way to do it?
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/54e17c02-f6cd-459e-b1d3-d708df13f73bn%40googlegroups.com.

Reply via email to