java - org.ksoap2.serialization.SoapObject cannot be cast to org.ksoap2.serialization.SoapPrimitive -


I am trying to display a list view by receiving a date from the SOAP web service, but every time I get an exception Is:

  public -> 
  org.ksoap2.serialization.SoapObject org.ksoap2.serialization.SoapPrimitive   

Code can not be molded into class Client Reclamation Activity {public final string NAMESPACE = "http://tempuri.org/"; Public end string SOAP_ACTION = "http://tempuri.org/GetReclamations"; Public end string METHOD_NAME = "GetReclamations"; List view lv; @ Override Protected Zero (Bundle Saved Instantstate) {Super. NET (Saved Instantstate); setContentView (R.layout.clients_reclamations); lv = (ListView) findViewById (R.id.listViewRec); AsyncCallWS function = new asynchronous (); Task.execute (); } Public class AsyncCallWS AsyncTask and lt; String, String, Arrayist & gt; {ArrayList & lt; Reclamation & gt; Results = New ArrayList & lt; Reclamation & gt; (); Protected Zero onPostExecute (ArrayList & nbsp;; Reclamation & gt; resultats) {lv.setAdapter (New CustomListAdapterRec (getApplicationContext (), resultsats)); Super.onPostExecute (resultats); } Secure ArrayList doInBackground (string ... parameter) {SOAP object request = new SOAP object (NAMESPACE, METHOD_NAME); Soapsisation envelope = new soap proofing Anaph (Softenfaf.Envelope.dotNet = true; envelope.setOutputSoapObject (request); http transportsS android HTTPRsport = new HTTP transferse (Hoskart); try {androidHttpTransport.call (SOAP_ACTION, envelope); last soap -Object response = (SOAP-object) envelope. GETRASONS (); LOG I ("REC list: ----", response.toString ()) RunOnUiThread (New Runnabal)) {@ Override Public Wide () Revalation Reclamation; SoobObject GetReclamationsResponse = New SOAP Object (); SOAPObact GetReclamationsResult = new SoapObject (); SOAP Object Reclamation = New SOAP Object (SO); SOAP Object REC = New SOAP Objet (); GetReclamationsResponse = (SoapObject) response. getProperty (0); GetReclamationsResult = (SoapObject) GetReclamationsResponse.getProperty (0); Rikecmensn = (Sopobjekt) for GetReclamationsResult.getProperty (0); (int i = 0; i & lt; Reclamations.getPropertyCount (); i ++ } {REAC (SoapObject) Reclamations.getProperty ("Reclamation"); SoapObject DateRec = new SoapObject (); SoapObject Objet = new SoapObject (); SoapObject Details = New SoapObject (); SoapObject Traitee = New SoapObject (); DateRec = (SoapObject) REC.getProperty ("DateRec"); Objet = (SoapObject) REC.getProperty ("Objet"); Description = (SoapObject) REC.getProperty ("Description"); Traitee = (SoapObject) REC.getProperty ( "Tratei"), Rivॅlemeshn = New Reclamation (); Reclamation.SetredreR (Description Two String ()); Rikmala ation.setOBJET_REC (Objet.toString ()); reclamation.setDate (DateRec.toString ()); reclamation.setIcon (.getResources () getDrawable (R.id.btn_yearly)); Resultats.add (improvements); Log.i ("Result Size: ------", resultats.size () + ""); }}}); } Hold (exception e) {e.printStackTrace (); } As a result result; }} Public Zero AfficheToast () {Toast T = Toast. Maketext (this, "Okue Reclamation Trace A", Toast. LNNHHLOG); T. Setgravity (Gravity Ceeter, 0, 0); t.show (); } Public string getURL () {string URL = zero; Shared references sp = PreferenceManager.getDefaultSharedPreferences (this); URL = sp.getString ("service", ""); Return url; }}

Change: Last Sabunbajh response = (Sopobakt) envelope KgetResponse () ;

The

Soppratikriya response = (Soppramiitiv) Lifafakgetrespons ();

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -