IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

API standards et tierces Android Discussion :

Web services XML-RPC entre un client Android et un serveur OpenERP


Sujet :

API standards et tierces Android

  1. #1
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut Web services XML-RPC entre un client Android et un serveur OpenERP
    Bonjour,
    j'ai essayé d'établir la connexion entre un client android et un serveur openerp,
    j'ai utilisé le code suivant:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    import java.util.Vector;
     
    import org.xmlrpc.android.XMLRPCClient;
    import org.xmlrpc.android.XMLRPCException;
     
     
    import android.app.Activity;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.ArrayAdapter;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Spinner;
    import android.widget.TextView;
    import android.widget.Toast;
     
     
    public class OpenERPDroid extends Activity {
     
    	public Button login_button;
    	public TextView host_tv,user_tv, pass_tv;
    	public EditText host_txt,user_txt, pass_txt;
     
    	public XMLRPCClient rpcClient, regClient;
    	public static final String HOST = "http://localhost:8069";
    	public static final String URL_COMMON = "/common";
    	public static final String URL_OBJECT = "/object";
    	public static final String URL_DB = "/db";
     
    	public String DB_NAME = "";
    	public String USERNAME = "";
    	public String PASSWORD = "";
    	public String user = "";
    	public int uid = 0;
     
    	public String partner = "";
    	public int partner_id = 0;
    	public Spinner db_spinner;
    	public ArrayAdapter spinnerArrayAdapter;
     
    	@Override
    	public void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.main);
     
    		// TEXTVIEW		
    		user_tv = (TextView) findViewById(R.id.user_tv);
    		pass_tv = (TextView) findViewById(R.id.pass_tv);
    		// EDITTEXT
    		user_txt = (EditText) findViewById(R.id.user_txt);
    		pass_txt = (EditText) findViewById(R.id.pass_txt);
     
    		// BUTTOn
    		login_button = (Button) findViewById(R.id.login_button);
    		login_button.setOnClickListener(LoginButtonClick);
     
     
    		db_spinner = (Spinner) findViewById(R.id.db_spinner);
    		spinnerArrayAdapter = new ArrayAdapter(this ,android.R.layout.simple_spinner_item);
    		spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
    		getDatabaseList();
     
    		db_spinner.setAdapter(spinnerArrayAdapter);
    	}
     
    	public void showToastNotification(String  message) {
    		Toast tmptoast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
    		tmptoast.show();
     
    	}
     
    	private OnClickListener LoginButtonClick = new OnClickListener() {
    		@Override
    		public void onClick(View v) {
    			try {
    				uid = Connect();
    				if (uid > 0) {
    					String succes ="successful login from "+ USERNAME+" using database "+DB_NAME;
    					showToastNotification(succes);
    					//RegisterTestData();
    				} else {
    					String fail = "bad login or password from "+ USERNAME+" using database " +DB_NAME;
    					showToastNotification(fail);
    				}
    			} catch (Exception e) {
    				Log.i("------------------ LOGIN FAILED 1", e.toString());
    			}
    		}
    	};
    	public int Connect()// String host, int port, String tinydb, String login,
    						// String password)
    	{
    		USERNAME = user_txt.getText().toString();
    		PASSWORD = pass_txt.getText().toString();
    		DB_NAME = db_spinner.getSelectedItem().toString();
    		rpcClient = new XMLRPCClient(HOST+URL_COMMON );
    		try {
    				// Connect
    				user = (String) rpcClient.call("login", DB_NAME, USERNAME, PASSWORD).toString();
    				Log.i("------------------CURRENT USER ID  ", user);
    				Object uid1 = Integer.parseInt(user);
    				if (uid1 instanceof Integer)
    					return (Integer) uid1;
    			return -1;
    		} catch (XMLRPCException e) {
    			Log.i("------------------ LOGIN FAILED-XMLRPCException", e.toString());
    			return -2;
    		} catch (Exception e) {
    			Log.i("------------------ LOGIN FAILED-EXCEPTION", e.toString());
    			return -3;
    		}
    	}
     
    	public void  getDatabaseList() {
    		 rpcClient = new XMLRPCClient(HOST+URL_DB);
    			Vector<Object> params = new Vector<Object>();
    			Object result = null;
    			try {
    				 result= rpcClient.call("list", params);
    			} catch (XMLRPCException e) {
    				e.printStackTrace();
    			}
    			Object[] a = (Object[]) result;
    			for (int i = 0; i < a.length; i++) {
    			    if (a[i] instanceof String){
    			    	spinnerArrayAdapter.add(a[i].toString());
    			    	}
    				}
    		Log.i("------------------ getDatabaseList","4");
    		if (a.length == 0) {
    			showToastNotification("No database exist");
    		}
    	 }
    }
    sachant que j'ai ajouté le package android-xmlrpc du lien: http://code.google.com/p/android-xml...ar.gz&can=2&q= j'ai toujours les erreurs suivantes:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    02-15 16:57:06.493: ERROR/AndroidRuntime(323): FATAL EXCEPTION: main
    02-15 16:57:06.493: ERROR/AndroidRuntime(323): java.lang.RuntimeException: Unable to start activity ComponentInfo{mn.usi.openerpdroid/mn.usi.openerpdroid.OpenERPDroid}: java.lang.NullPointerException
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.access$2300(ActivityThread.java:125)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.os.Handler.dispatchMessage(Handler.java:99)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.os.Looper.loop(Looper.java:123)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.main(ActivityThread.java:4627)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at java.lang.reflect.Method.invokeNative(Native Method)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at java.lang.reflect.Method.invoke(Method.java:521)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at dalvik.system.NativeStart.main(Native Method)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323): Caused by: java.lang.NullPointerException
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at mn.usi.openerpdroid.OpenERPDroid.getDatabaseList(OpenERPDroid.java:128)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at mn.usi.openerpdroid.OpenERPDroid.onCreate(OpenERPDroid.java:65)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
    02-15 16:57:06.493: ERROR/AndroidRuntime(323):     ... 11 more
    est ce que quelqu'un peut m'aider?
    merci d'avance

  2. #2
    Membre actif Avatar de chpil
    Homme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Octobre 2011
    Messages : 143
    Points : 212
    Points
    212
    Par défaut
    Tu as une belle NullPointerException à l'exécution de ton application, qui se produit en ligne 128 de ta classe OpenERPDroid.
    A quoi correspond cette ligne ?

  3. #3
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    si vous parlez de :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    for (int i = 0; i < a.length; i++) {
    			    if (a[i] instanceof String){
    			    	spinnerArrayAdapter.add(a[i].toString());
    			    	}}
    ça correspond à une boucle de stockage des noms des bases de données du serveur openerp dans une table d adapter

  4. #4
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    ceci est l'équivalent en java qui marche bien:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    try {
    // Retrieve databases
    Vector<Object> params = new Vector<Object>();
    Object result = xmlrpcDb.execute("list", params);
    Object[] a = (Object[]) result;
    Vector<String> res = new Vector<String>();
    for (int i = 0; i < a.length; i++) {
    if (a[i] instanceof String) {
    res.addElement((String) a[i]);
    System.out.println(a[i]);
    }
    }
    } catch (XmlRpcException e) {
    e.printStackTrace();
    }

  5. #5
    Membre actif Avatar de chpil
    Homme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Octobre 2011
    Messages : 143
    Points : 212
    Points
    212
    Par défaut
    Est-ce que c'est parce que tu as déplacé le catch que cela fonctionne ? Aurais-tu une XmlRpcException de lancée ?
    Et utiliser Vector n'est pas une bonne idée, du fait du caractère "synchronized" de cette classe, qui rend son utilisation coûteuse en terme de perf si on n'a pas besoin de cette caractéristique de synchronisation. Utilise plutôt List/ArrayList

  6. #6
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    Avant les problèmes de synchronisation, il n y a pas de connexion. Parce que en essayant juste le code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    public class OpenERPDroid extends Activity {
     
    	public Button login_button;
    	public TextView host_tv,user_tv, pass_tv;
    	public EditText host_txt,user_txt, pass_txt;
     
    	public XMLRPCClient rpcClient, regClient;
    	public static final String HOST = "http://localhost:8069/xmlrpc";
    	public static final String URL_COMMON = "/common";
    	public static final String URL_OBJECT = "/object";
    	public static final String URL_DB = "/db";
     
    	public String DB_NAME = "nom d'une base";
    	public String USERNAME = "nom de l admin";
    	public String PASSWORD = "mot de passe";
    	public String user = "";
    	public int uid = 0;
     
    	public String partner = "";
    	public int partner_id = 0;
    	public Spinner db_spinner;
    	public ArrayAdapter spinnerArrayAdapter;
     
    	@Override
    	public void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.main);
     
    		// TEXTVIEW		
    		user_tv = (TextView) findViewById(R.id.user_tv);
    		pass_tv = (TextView) findViewById(R.id.pass_tv);
    		// EDITTEXT
    		user_txt = (EditText) findViewById(R.id.user_txt);
    		pass_txt = (EditText) findViewById(R.id.pass_txt);
    // BUTTOn
    		login_button = (Button) findViewById(R.id.login_button);
    		login_button.setOnClickListener(LoginButtonClick);
    		db_spinner = (Spinner) findViewById(R.id.db_spinner);
    		spinnerArrayAdapter = new ArrayAdapter(this ,android.R.layout.simple_spinner_item);
    		spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);
     
          db_spinner.setAdapter(spinnerArrayAdapter);}
     
    	public void showToastNotification(String  message) {
    		Toast tmptoast = Toast.makeText(this, message, Toast.LENGTH_SHORT);
    		tmptoast.show();}
    	private OnClickListener LoginButtonClick = new OnClickListener() {
    		@Override
    		public void onClick(View v) {
    			try {
    				uid = Connect();
    				if (uid > 0) {
    					String succes ="successful login from "+ USERNAME+" using database "+DB_NAME;
    					showToastNotification(succes);
    					//RegisterTestData();
    				} else {
    					String fail = "bad login or password from "+ USERNAME+" using database " +DB_NAME;
    					showToastNotification(fail);}
    			} catch (Exception e) {
    				Log.i("------------------ LOGIN FAILED 1", e.toString());
    			}}};
    	public int Connect()// String host, int port, String tinydb, String login,
    						// String password)
    	{
    	rpcClient = new XMLRPCClient(HOST+URL_COMMON );
    		try {
    				// Connect
    				user = (String) rpcClient.call("login", DB_NAME, USERNAME, PASSWORD).toString();
    				Log.i("------------------CURRENT USER ID  ", user);
    				Object uid1 = Integer.parseInt(user);
    				if (uid1 instanceof Integer)
    					return (Integer) uid1;
    			return -1;
    		} catch (XMLRPCException e) {
    			Log.i("------------------ LOGIN FAILED-XMLRPCException", e.toString());
    			return -2;
    		} catch (Exception e) {
    			Log.i("------------------ LOGIN FAILED-EXCEPTION", e.toString());
    			return -3;
    		}}
    en cliquant sur le bouton login ça donne le message " "bad login or password from "+ USERNAME+" using database " +DB_NAME" comme toast.

  7. #7
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    Dans le logCat j'ai ceci:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    02-16 11:22:26.941: INFO/------------------ LOGIN FAILED-XMLRPCException(509): org.xmlrpc.android.XMLRPCException: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:8069 refused

  8. #8
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Le serveur auquel tu es censé accéder sur ta machine est-il démarré?

    J'imagine bien qu'il n'est pas sur ton téléphone, donc pourquoi ce localhost (ou alors tu bosses sous l'émulateur)?
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  9. #9
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    effectivement j'utilise l'émulateur, le serveur est démarré et je peux établir la connexion avec le serveur en utilisant JAVA.

  10. #10
    Membre actif Avatar de chpil
    Homme Profil pro
    Inscrit en
    Octobre 2011
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations forums :
    Inscription : Octobre 2011
    Messages : 143
    Points : 212
    Points
    212
    Par défaut
    Si tu veux accéder à un serveur tournant sur ton PC, depuis l'émulateur Android, l'adresse à utiliser est 10.0.2.2, et non pas localhost (cf doc)

  11. #11
    Futur Membre du Club
    Inscrit en
    Février 2012
    Messages
    16
    Détails du profil
    Informations forums :
    Inscription : Février 2012
    Messages : 16
    Points : 7
    Points
    7
    Par défaut
    Oui maintenant ça marche, il fallait mettre 10.0.2.2 au lieu de localhost, merci beaucoup vous m'avez sauvé

  12. #12
    Nouveau Candidat au Club
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2012
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Java
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mars 2012
    Messages : 1
    Points : 1
    Points
    1
    Par défaut version android
    J'ai essayé le programme sur une version Android 1.5 et il fonctionne mais dès que je passe sur une version 3.2 ou 4.0 , j'ai une XMLRPC exeption.

  13. #13
    Nouveau membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Mars 2011
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 17
    Points : 27
    Points
    27
    Par défaut client android et openerp
    salut j'essayer ce code pour faire la connexion entre un client android et openerp server et apres l'execution il m'affiche l'erreur suivant :si quilqu'un a une solution pour resolu ce probleme merci

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Could not find class 'org.xmlrpc.android.XMLRPCClient', referenced from method com.example.client_android.MainActivity.Connect
    merci

  14. #14
    Expert éminent sénior
    Avatar de sinok
    Profil pro
    Inscrit en
    Août 2004
    Messages
    8 765
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Août 2004
    Messages : 8 765
    Points : 12 977
    Points
    12 977
    Par défaut
    Il te faut inclure la librairie citée dans le premier post.
    Hey, this is mine. That's mine. All this is mine. I'm claiming all this as mine. Except that bit. I don't want that bit. But all the rest of this is mine. Hey, this has been a really good day. I've eaten five times, I've slept six times, and I've made a lot of things mine. Tomorrow, I'm gonna see if I can't have sex with something.

  15. #15
    Nouveau membre du Club
    Homme Profil pro
    Analyse système
    Inscrit en
    Mars 2011
    Messages
    17
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Maroc

    Informations professionnelles :
    Activité : Analyse système
    Secteur : Alimentation

    Informations forums :
    Inscription : Mars 2011
    Messages : 17
    Points : 27
    Points
    27
    Par défaut client android et openerp
    salut
    bon j'ai tout fait j'ai inclus les librairies xmlrpc-android.jar qui contient la classe XMLRPCClient dans laquelle il m'affiche l'erreur.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    public void  getDatabaseList() {
    		 rpcClient = new XMLRPCClient(HOST+URL_DB);
    			Vector<Object> params = new Vector<Object>();
    			Object result = null;
    			try {
    				 result= rpcClient.call("list", params);
    			} catch (XMLRPCException e) {
    				e.printStackTrace();
    			}
    			Object[] a = (Object[]) result;
    			for (int i = 0; i < a.length; i++) {
    			    if (a[i] instanceof String){
    			    	spinnerArrayAdapter.add(a[i].toString());
    			    	}
    				}
    		Log.i("------------------ getDatabaseList","4");
    		if (a.length == 0) {
    			showToastNotification("No database exist");
    		}
    	 }
    merci

  16. #16
    Futur Membre du Club
    Inscrit en
    Août 2013
    Messages
    3
    Détails du profil
    Informations forums :
    Inscription : Août 2013
    Messages : 3
    Points : 5
    Points
    5
    Par défaut
    mais comment je peux faire une méthode qui effectué la recherche sur l'ensemble des parteners
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    	 XMLRPCClient client = new XMLRPCClient("http://10.0.2.2:8069/xmlrpc/object");
            	 Object[] params2 = { 11 };
            	 Vector<Object> params = new Vector<Object>();
            	 params.add(params2);
            	 Vector<Object> arg = new Vector<Object>();
            	 arg.add("s2tic");
            	 arg.add((Object)1);
            	 arg.add("admin");
            	 arg.add("res.partner");
            	 arg.add("search");
            	 // arg.add(24);
            	 arg.add(params2);
     
            	 int c = (Integer) client.call("execute", arg);
    Une erreur qui s'affiche

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer

  17. #17
    Candidat au Club
    Femme Profil pro
    Étudiant
    Inscrit en
    Janvier 2015
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 31
    Localisation : Maroc

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Janvier 2015
    Messages : 6
    Points : 4
    Points
    4
    Par défaut Probleme :nullPointerException
    aidez moi SVP ,j ai teste la connexion du serveur odoo qui se trouve sur ma machine a partir de l emulateur (client android) et j obtient un message a logCat NullPointerException

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Talend] Test d'un service web (ou xml-rpc)
    Par oca dans le forum Développement de jobs
    Réponses: 3
    Dernier message: 17/06/2015, 11h13
  2. Réponses: 4
    Dernier message: 06/09/2014, 13h38
  3. Client Android et un serveur OpenERP
    Par totocasa dans le forum API standards et tierces
    Réponses: 0
    Dernier message: 10/06/2014, 17h17
  4. XML-RPC un client Android et un serveur OpenERP
    Par aymenmimati dans le forum API standards et tierces
    Réponses: 1
    Dernier message: 13/03/2014, 10h08
  5. Réponses: 2
    Dernier message: 10/11/2009, 08h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo