<ArrayOfString> <string>ALI</string> <string>Mohamed Ahmed</string> <string>Shis</string> </ArrayOfString>
<pre lang="text"> public void getcontacts(){ try { SoapObject request = new SoapObject(NAMESPACE,METHOD_NAME1); request.addProperty("Email",App.GetEmail().toString()); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); envelope.dotNet = true; HttpTransportSE androidHttpTransport = new HttpTransportSE(URL); androidHttpTransport.call(SOAP_ACTION1, envelope); SoapObject result = (SoapObject)envelope.bodyIn; if (result != null) { Toast.makeText(getApplicationContext(), envelope.getResponse().toString(), Toast.LENGTH_LONG).show(); Object[] Cont =(String[]) result.getProperty(0); String[] Contacts = Arrays.copyOf(Cont,Cont.length,String[].class); Listview1 = (ListView)findViewById(R.id.listView1); ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice, Contacts); Listview1.setAdapter(adapter); } else { } } catch (Exception e) { Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)