Expand my Community achievements bar.

Having issue with <mx:request>

Avatar

Former Community Member
The issue I’m having is that the request is supposed to
be like this:



<tns:GetListItems xmlns:tns="
http://schemas.microsoft.com/sharepoint/soap/">

<tns:listName>DTS Support</tns:listName>


<tns:viewName>73D2973D-03C1-4B32-BBB9-22A15D3B1F8D</tns:viewName>

<tns:viewFields>


<FieldRef
name=’Title’/>


</tns:viewFields>

</tns:GetListItems>



But it’s sending this:



<tns:GetListItems xmlns:tns="
http://schemas.microsoft.com/sharepoint/soap/">

<tns:listName>DTS Support</tns:listName>


<tns:viewName>73D2973D-03C1-4B32-BBB9-22A15D3B1F8D</tns:viewName>

<tns:viewFields>


<tns:Name>Title</tns:Name>

</tns:viewFields>

</tns:GetListItems>



This is what my mxml looks like:



<mx:WebService id="ws"

wsdl="
/_vti_bin/Lists.asmx?WSDL"


useProxy="false" showBusyCursor="false">

<mx:operation name="GetListItems"
result="GetList_Result(event)"

fault="mx.controls.Alert.show(event.fault.faultString)">

<mx:request>

<listName>DTS Support</listName>


<viewName>73D2973D-03C1-4B32-BBB9-22A15D3B1F8D</viewName>

<viewFields><FieldRef
Name='Title'/></viewFields>

</mx:request>

</mx:operation>

</mx:WebService>



I also tried putting the “<FieldRef
Name='Title'/>” into a string in actionscript and then
setting it to <viewFields>{strXML}</viewFields> but
then it sends it changes the brackets to &lgt;



I also tried sending the request in actionscript using
ws.GetListItems(...); but got the same result.



Thank you for your help, any and all suggestions are welcome!
1 Reply

Avatar

Former Community Member
So, I ended up defining the xml file in the actionscript part
of the file. and then calling the query like this:



private function executeQuery():void

{

ws.Query(requestXML);

}