I start the development on Android, I have make the "Hello World". Now I want make an application with XML RPC.
I have read the tuto on XML RPC on this forum. I have donwload the latest version of the librairy on SVN.
But I don't understund how use this. I have make the exemple with a real XML RPC, but when I run my application, nothing go to screen.
This is my code :
Using java Syntax Highlighting
- import android.app.Activity;
- import android.os.Bundle;
- import android.widget.TextView;
- import org.xmlrpc.android.*;
- public class MagenToid extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- TextView session = new TextView(this);
- String apiLogin="toto";
- String apiKey="password";
- XMLRPCClient client = new XMLRPCClient("http://www.url.com/api/xmlrpc/");
- try {
- //I have a webservice "Login" accepte 2 parameter login and password
- session = (TextView) client.call("login", apiLogin, apiKey);
- setContentView(session);
- } catch (XMLRPCException e) {
- // Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
with this webservice "Login", session become a string.
I want print the variable session on screen like "hello world".
The project run whitout problem, but don't show the string session.
I am a noob on android, If somebody can help me, and show my mistake.
Thank you.





