i have flashbuilder 4.6 application connects sharepoint 2010 via list web service calling getlistitems. works fine until try add query parameter. below webservice in application works returning list items.
<mx:webservice id="spws" wsdl="{wsdurl}" endpointuri="http://rich-hp/_vti_bin/lists.asmx" fault="wsdlfault(event)" load="spws_loadhandler(event)" >
<mx:operation name="getlistitems" fault="glifault(event)" result="gliresult(event)" >
<mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/" >
<listname>{listid}</listname>
<rowlimit>1000</rowlimit>
</mx:request>
</mx:operation>
</mx:webservice>
the problem when add caml query in red below sp throws exception.
<mx:webservice id="spws" wsdl="{wsdurl}" endpointuri="http://rich-hp/_vti_bin/lists.asmx" fault="wsdlfault(event)"load="spws_loadhandler(event)" >
<mx:operation name="getlistitems" fault="glifault(event)" result="gliresult(event)" >
<mx:request xmlns="http://schemas.microsoft.com/sharepoint/soap/" >
<listname>{listid}</listname>
<rowlimit>1000</rowlimit>
<soap:query xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<soap:where >
<soap:eq >
<soap:fieldref name="casenumber" />
<soap:value type="text">aaa=9000</soap:value>
</soap:eq>
</soap:where>
</soap:query>
</mx:request>
</mx:operation>
</mx:webservice>
?
the exact same call soupui works.
using charles, traced request , can see why error happening. below request flex sending tho sp.
<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">
<soap-env:body>
<tns:getlistitems xmlns:tns="http://schemas.microsoft.com/sharepoint/soap/">
<tns:listname>452da74c-4f14-44a5-b614-c4c4cedeb06a</tns:listname>
<tns:query>
<tns:name>casenumber</tns:name>
<tns:value>aaa=9000</tns:value>
</tns:query>
<tns:rowlimit>1000</tns:rowlimit>
</tns:getlistitems>
</soap-env:body>
</soap-env:envelope>
here's request works soapui
<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.microsoft.com/sharepoint/soap/">
<soapenv:header/>
<soapenv:body>
<soap:getlistitems>
<soap:listname>452da74c-4f14-44a5-b614-c4c4cedeb06a</soap:listname>
<soap:rowlimit>1000</soap:rowlimit>
<soap:query>
<soap:where>
<soap:eq>
<soap:fieldref name="casenumber" />
<soap:value type="text">aaa=9000</soap:value>
</soap:eq>
</soap:where>
</soap:query>
</soap:getlistitems>
</soapenv:body>
</soapenv:envelope>
notice how query being reformated , changed when sent application. question is bug or there someway force flex send query written?
the excwption thrown - element <query> of parameter query missing or invalid.
this makes sense since invalid
rich ruiz
got working using sharepoint connector library http://code.google.com/p/sharepoint-as3-connector/
now need ad ability use view.
rich
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment