Note that there are some explanatory texts on larger screens.

plurals
  1. POIssue in accessing Sharepoint service from Flex
    text
    copied!<p>I am trying to access getListItems method of the Lists service of Sharepoint from Flex using WebService. </p> <p>It is working fine when I omit the query and the viewFields nodes in the request xml. But if I add any query or FieldRef in Viewfields it is throwing error from the service.</p> <p>Below is the code.</p> <pre><code>&lt;mx:WebService id="ws2" wsdl="{url}/_vti_bin/Lists.asmx?WSDL" result="ws2result(event)" fault="ws2fault(event)" showBusyCursor="true"&gt; &lt;mx:operation name="GetListItems" resultFormat="e4x"&gt; &lt;mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt; &lt;listName&gt;{listId}&lt;/listName&gt; &lt;viewName&gt;{viewId}&lt;/viewName&gt; &lt;ViewFields&gt;&lt;FieldRef Name='Locations'/&gt;&lt;/ViewFields&gt; &lt;/mx:request&gt; &lt;/mx:operation&gt; &lt;/mx:WebService&gt; </code></pre> <p>It is working fine without the ViewFields. </p> <p>Can we use the ViewFields and query from flex?</p> <p>Also is there any way to get the sum of items satisfying a specific condetions using this service?</p> <hr> <p>Applied the new format. But still its throwing error.</p> <p>The SOAP message captured from fiddler.</p> <pre><code>&lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt; &lt;SOAP-ENV:Body&gt; &lt;tns:GetListItems xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/"&gt; &lt;tns:listName&gt;{0A1C8CDA-E738-46B7-923D-1D2C599D960F}&lt;/tns:listName&gt; &lt;tns:viewFields&gt; &lt;tns:Name&gt;ID&lt;/tns:Name&gt; &lt;/tns:viewFields&gt; &lt;/tns:GetListItems&gt; &lt;/SOAP-ENV:Body&gt; &lt;/SOAP-ENV:Envelope&gt; </code></pre> <p>But the message in the operation tag is passed as below.</p> <pre><code>&lt;mx:operation name="GetListItems" &gt; &lt;mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/"&gt; &lt;listName&gt;\{0A3C3DCA-E744-46C7-916D-1D2C539A960F\}&lt;/listName&gt; &lt;viewFields&gt; &lt;ViewFields&gt; &lt;FieldRef Name="ID" /&gt; &lt;/ViewFields&gt; &lt;/viewFields&gt; &lt;/mx:request&gt; &lt;/mx:operation&gt; </code></pre>
 

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