如何在列表视图中打印Ksoap2值

如何在列表视图中打印Ksoap2值

本文介绍了如何在列表视图中打印Ksoap2值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SoapObject request=new SoapObject(NAMESPACE,WebMethodName);
PropertyInfo sayHellopi=new PropertyInfo();

sayHellopi.setName("get");
sayHellopi.setValue(na);
sayHellopi.setType(String.class);

request.addProperty(sayHellopi);

SoapSerializationEnvelope envelope=new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);

AndroidHttpTransport transp = new AndroidHttpTransport(URL);

try {
   transp.call(SOAP_ACTION,envelope);
   //ArrayList primitive= (ArrayList) envelope.bodyIn;
   SoapObject primitive= (SoapObject) envelope.bodyIn;

   arraylist=new ArrayList<string>();

   for(int i=0;i<primitive.getpropertycount();i++){>
      arraylist.add((String) primitive.getProperty(i));
      //arraylist.add(primitive.getProperty(i).toString());
      //arraylist.add(primitive.getPropertyCount());
      System.out.println("ForLoop--------------"+primitive.getProperty(i));

      // System.out.println("is result null????????????"+arrayList.listIterator());
   }

}catch (Exception e){
   System.out.println("Error Value" + e);
   //resText="Error Occur";
   e.printStackTrace();
 }

推荐答案

这篇关于如何在列表视图中打印Ksoap2值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-04 07:48