Mam problem z wołaniem RESTa (wygląda na błąd z parsowaniem).
Exception (leci na lini z wywołaniem metody post()):
Failed resolution of: Ljavax/xml/bind/annotation/XmlRootElement;
java.lang.ClassNotFoundException: Didn't find class "javax.xml.bind.annotation.XmlRootElement" on path: DexPathList[[zip file "/data/app/com.app-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
KOD:
public void registerUser(User user) {
new AsyncTask<User,Void,Void>() {
public Void doInBackground(User... params) {
ClientResponse response = null;
try {
WebResource webQuery = RestClient.service.path("user/registerUser");
webQuery.type(MediaType.APPLICATION_JSON);
response = webQuery.post(ClientResponse.class, params[0]);
System.out.print("dziala");
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
}.execute(user);
}
KLASA USER:
public class User {
private String nick;
private String password;
private String email;
private Boolean permament = Boolean.valueOf(false);
public User() {
}
getters...
setters...
}
Kombinuje, szukam i nic... ;/