web services - How to retrieve the size of a file in a document library in sharepoint through webservices using Java -
i'm writting application in java has report available files in document library on sharepoint 2007. application uses java sharepoint library korecky (project home). works fine except fact, beside of several file information don't file size.
concretely, request send list.asmx webservice calling getlistitems method.
the request looks follows:
<queryoptions> <viewattributes includerootfolder="true" scope="recursiveall"/> <includemandatorycolumns> true </includemandatorycolumns> <dateinutc> true </dateinutc> </queryoptions>
according several forums in response webservice there should field available named ows_file_x0020_size should contain int representing file size, missing. have idea how request needs modified receive file size?
you need field want call (in viewfields). final request should :
<soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:body> <getlistitems xmlns="http://schemas.microsoft.com/sharepoint/soap/"> <listname>my documents list</listname> <viewname></viewname> <query><query></query></query> <viewfields> <viewfields properties="true"> <fieldref name="fileleafref"></fieldref> <fieldref name="file_x0020_size"></fieldref> </viewfields> </viewfields> <rowlimit>0</rowlimit> <queryoptions> <queryoptions> <dateinutc>true</dateinutc> <paging listitemcollectionpositionnext=""></paging> <viewattributes scope="recursive"></viewattributes> <includeattachmenturls>true</includeattachmenturls> <includemandatorycolumns>false</includemandatorycolumns> <expanduserfield>false</expanduserfield> </queryoptions> </queryoptions> </getlistitems> </soap:body> </soap:envelope>
Comments
Post a Comment