Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am new to Android and stuck up with something for past couple of days. the code of my main activity is as following

package com.example.exenon;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.ContactsContract.Data;
import android.app.Activity;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class Reunion extends Activity {
      private static String SOAP_ACTION = "http://schemas.microsoft.com/sharepoint/soap/GetListItems";
      private static String NAMESPACE = "http://schemas.microsoft.com/sharepoint/soap/";
      private static String METHOD_NAME = "GetListItems";
       private static String URL = "http://*******/_vti_bin/Lists.asmx?wsdl";
      ListView tv;
      TextView tt;

    protected void onCreate(Bundle b) {
        super.onCreate(b);
        setContentView(R.layout.reunion_activity);
        //tt = (TextView) findViewById(R.id.textView1);
        //tv = (ListView) findViewById(R.id.ListView1);
          SharePoint c = new SharePoint();
            c.execute();
    }
    private class SharePoint extends AsyncTask<Data, Void, SoapObject> {
     SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

     protected SoapObject doInBackground(Data... data) {
          SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);       


             request.addProperty("listName","List6");
             request.addProperty("rowLimit",150);



             envelope.setOutputSoapObject(request);
             envelope.dotNet = true;

             try {
                   HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);


                   androidHttpTransport.call(SOAP_ACTION, envelope);


             }catch (Exception e) {
                 e.printStackTrace();

             }

            return null;

     }


    protected void onPostExecute(SoapObject obj) {
        SoapObject result = (SoapObject)envelope.bodyIn;
         System.out.println(result);


    }
    }


}

here I am trying to connect to a sharepoint 2010 list using the GetListItems web service.And I think that and not able to connect to the web service because the return of result is null as you can see in my logcat :

04-08 10:17:21.037: D/OpenGLRenderer(1290): Flushing caches (mode 0)
04-08 10:17:33.025: I/dalvikvm(1339): threadid=3: reacting to signal 3
04-08 10:17:33.174: I/dalvikvm(1339): Wrote stack traces to '/data/anr/traces.txt'
04-08 10:17:33.364: D/dalvikvm(1339): GC_FOR_ALLOC freed 78K, 2% free 9187K/9347K, paused 64ms
04-08 10:17:33.384: I/dalvikvm-heap(1339): Grow heap (frag case) to 10.503MB for 1536016-byte allocation
04-08 10:17:33.484: I/dalvikvm(1339): threadid=3: reacting to signal 3
04-08 10:17:33.585: I/dalvikvm(1339): Wrote stack traces to '/data/anr/traces.txt'
04-08 10:17:33.604: D/dalvikvm(1339): GC_CONCURRENT freed 1K, 2% free 10686K/10887K, paused 7ms+6ms
04-08 10:17:33.724: D/dalvikvm(1339): GC_FOR_ALLOC freed 0K, 2% free 10686K/10887K, paused 50ms
04-08 10:17:33.754: I/dalvikvm-heap(1339): Grow heap (frag case) to 13.798MB for 3456016-byte allocation
04-08 10:17:33.844: D/dalvikvm(1339): GC_CONCURRENT freed 0K, 2% free 14061K/14279K, paused 5ms+7ms
04-08 10:17:33.984: I/dalvikvm(1339): threadid=3: reacting to signal 3
04-08 10:17:34.024: I/dalvikvm(1339): Wrote stack traces to '/data/anr/traces.txt'
04-08 10:17:34.224: D/libEGL(1339): loaded /system/lib/egl/libGLES_android.so
04-08 10:17:34.254: D/libEGL(1339): loaded /system/lib/egl/libEGL_emulation.so
04-08 10:17:34.264: D/(1339): HostConnection::get() New Host Connection established 0xae028, tid 1339
04-08 10:17:34.305: D/libEGL(1339): loaded /system/lib/egl/libGLESv1_CM_emulation.so
04-08 10:17:34.314: D/libEGL(1339): loaded /system/lib/egl/libGLESv2_emulation.so
04-08 10:17:34.484: I/dalvikvm(1339): threadid=3: reacting to signal 3
04-08 10:17:34.524: W/EGL_emulation(1339): eglSurfaceAttrib not implemented
04-08 10:17:34.535: I/dalvikvm(1339): Wrote stack traces to '/data/anr/traces.txt'
04-08 10:17:34.574: D/OpenGLRenderer(1339): Enabling debug mode 0
04-08 10:17:35.304: I/dalvikvm(1339): threadid=3: reacting to signal 3
04-08 10:17:35.334: I/dalvikvm(1339): Wrote stack traces to '/data/anr/traces.txt'
04-08 10:17:40.754: W/EGL_emulation(1339): eglSurfaceAttrib not implemented
04-08 10:17:41.004: D/OpenGLRenderer(1339): Flushing caches (mode 0)
04-08 10:17:42.145: W/System.err(1339): org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG <{http://schemas.xmlsoap.org/wsdl/}wsdl:definitions targetNamespace='http://schemas.microsoft.com/sharepoint/soap/'>@2:596 in java.io.InputStreamReader@417b3f60) 
04-08 10:17:42.145: W/System.err(1339):     at org.kxml2.io.KXmlParser.require(KXmlParser.java:2046)
04-08 10:17:42.155: W/System.err(1339):     at org.ksoap2.SoapEnvelope.parse(SoapEnvelope.java:127)
04-08 10:17:42.155: W/System.err(1339):     at org.ksoap2.transport.Transport.parseResponse(Transport.java:100)
04-08 10:17:42.165: W/System.err(1339):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:195)
04-08 10:17:42.165: W/System.err(1339):     at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:95)
04-08 10:17:42.175: W/System.err(1339):     at com.example.exenon.Reunion$SharePoint.doInBackground(Reunion.java:50)
04-08 10:17:42.175: W/System.err(1339):     at com.example.exenon.Reunion$SharePoint.doInBackground(Reunion.java:1)
04-08 10:17:42.175: W/System.err(1339):     at android.os.AsyncTask$2.call(AsyncTask.java:264)
04-08 10:17:42.185: W/System.err(1339):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-08 10:17:42.195: W/System.err(1339):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-08 10:17:42.205: W/System.err(1339):     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
04-08 10:17:42.205: W/System.err(1339):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
04-08 10:17:42.205: W/System.err(1339):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
04-08 10:17:42.214: W/System.err(1339):     at java.lang.Thread.run(Thread.java:856)
04-08 10:17:42.295: I/System.out(1339): null

thanks for helping me :)

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.