Note that there are some explanatory texts on larger screens.

plurals
  1. POParse ksoap response
    primarykey
    data
    text
    <p>In response by </p> <pre><code>transport.call(SOAP_ACTION, envelope, headerList); </code></pre> <p>in debug mode in <em>responseDump</em> I have xml like this</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;&lt;soap:Body&gt;&lt;GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt;&lt;GetListItemsResult&gt;&lt;listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882' xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882' xmlns:rs='urn:schemas-microsoft-com:rowset' xmlns:z='#RowsetSchema'&gt; &lt;rs:data ItemCount="5"&gt; &lt;z:row ows_Attachments='0' ows_LinkTitle='testtask1' ows_Status='Not Started' ows_Priority='(2) Normal' ows_Predecessors='' ows__ModerationStatus='0' ows__Level='1' ows_Title='testtask1' ows_ID='1' ows_UniqueId='1;#{A6E41E02-46FD-4363-A4A3-440AF902B280}' ows_owshiddenversion='1' ows_FSObjType='1;#0' ows_Created_x0020_Date='1;#2012-02-28 09:55:49' ows_Created='2012-02-28 09:55:49' ows_FileLeafRef='1;#1_.000' ows_PermMask='0x7fffffffffffffff' ows_Modified='2012-02-28 09:55:49' ows_FileRef='1;#Lists/Tasks/1_.000' /&gt; &lt;z:row ows_Attachments='0' ows_LinkTitle='testtask2' ows_Status='Not Started' ows_Priority='(1) High' ows_Predecessors='' ows__ModerationStatus='0' ows__Level='1' ows_Title='testtask2' ows_ID='2' ows_UniqueId='2;#{A320D923-8BC8-4341-B40A-4D39C1FB01DB}' ows_owshiddenversion='1' ows_FSObjType='2;#0' ows_Created_x0020_Date='2;#2012-02-28 09:55:58' ows_Created='2012-02-28 09:55:58' ows_FileLeafRef='2;#2_.000' ows_PermMask='0x7fffffffffffffff' ows_Modified='2012-02-28 09:55:58' ows_FileRef='2;#Lists/Tasks/2_.000' /&gt; &lt;z:row ows_Attachments='0' ows_LinkTitle='testtask3' ows_Status='In Progress' ows_Priority='(2) Normal' ows_Predecessors='' ows__ModerationStatus='0' ows__Level='1' ows_Title='testtask3' ows_ID='3' ows_UniqueId='3;#{84071EBA-F38D-4EA9-A912-F8DD0088BD38}' ows_owshiddenversion='1' ows_FSObjType='3;#0' ows_Created_x0020_Date='3;#2012-02-28 09:56:07' ows_Created='2012-02-28 09:56:07' ows_FileLeafRef='3;#3_.000' ows_PermMask='0x7fffffffffffffff' ows_Modified='2012-02-28 09:56:07' ows_FileRef='3;#Lists/Tasks/3_.000' /&gt; &lt;z:row ows_Attachments='0' ows_LinkTitle='testtask4' ows_Status='Waiting on someone else' ows_Priority='(3) Low' ows_Predecessors='' ows__ModerationStatus='0' ows__Level='1' ows_Title='testtask4' ows_ID='4' ows_UniqueId='4;#{AD6ED317-3F07-4998-89D2-38D8B6F0756E}' ows_owshiddenversion='1' ows_FSObjType='4;#0' ows_Created_x0020_Date='4;#2012-02-28 09:56:16' ows_Created='2012-02-28 09:56:16' ows_FileLeafRef='4;#4_.000' ows_PermMask='0x7fffffffffffffff' ows_Modified='2012-02-28 09:56:16' ows_FileRef='4;#Lists/Tasks/4_.000' /&gt; &lt;z:row ows_Attachments='0' ows_LinkTitle='testtask5' ows_Status='Not Started' ows_Priority='(2) Normal' ows_Predecessors='' ows__ModerationStatus='0' ows__Level='1' ows_Title='testtask5' ows_ID='5' ows_UniqueId='5;#{50BC423F-E6A5-4719-B734-E528A08AE83B}' ows_owshiddenversion='1' ows_FSObjType='5;#0' ows_Created_x0020_Date='5;#2012-02-28 19:22:52' ows_Created='2012-02-28 19:22:52' ows_FileLeafRef='5;#5_.000' ows_PermMask='0x7fffffffffffffff' ows_Modified='2012-02-28 19:22:52' ows_FileRef='5;#Lists/Tasks/5_.000' /&gt; &lt;/rs:data&gt; &lt;/listitems&gt;&lt;/GetListItemsResult&gt;&lt;/GetListItemsResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt; </code></pre> <p>But method <em>envelope.getResponse()</em> return text below</p> <pre><code>anyType{listitems=anyType{data=anyType{row=anyType{}; row=anyType{}; row=anyType{}; row=anyType{}; row=anyType{}; }; }; } </code></pre> <p><strong>UPD1</strong> I read this <a href="http://www.helloandroid.com/tutorials/using-ksoap2-android-and-parsing-output-data" rel="nofollow">acticle</a>, but it's not solution for my response.</p> <p>Ok, I'm trying parse the answer as below</p> <pre><code> transport.call(SOAP_ACTION2, envelope, headerList); // 1st step - call soap query SoapObject response = (SoapObject) envelope.getResponse(); SoapObject soapObject = (SoapObject) envelope.getResponse(); String title= null; for (int i = 0; i &lt; soapObject.getPropertyCount(); i++) { // soapObject.getPropertyCount() is only one (!!!!) SoapObject resource = (SoapObject) response.getProperty(i); // in resource only this - anyType{data=anyType{row=anyType{}; row=anyType{}; row=anyType{}; row=anyType{}; row=anyType{}; }; } title = resource.getAttribute("ows_Title").toString(); .... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload