Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I searched around the internet (and on this stackexchange site), but didnt find any answer.

I wrote a small C# application that should retrieve some data via the SOAP webservice of a sharepoint server (just a one-way read access) and further process them. So far, it works great, except one small thing: the response contains tons of additional metadata fields:

ows_MetaInfo
ows__ModerationStatus
ows__Level
ows_Title
ows_ID
ows_owshiddenversion
ows_UniqueId
ows_FSObjType
ows_Created
ows_FileRef

I specified the fields I'm interested in via ViewFields, but still all those useless (at least for me) fields are returned, which creates quite an unnecessary overhead.

Is there a way to get rid of these? Thanks in advance!

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

In SP2007 the best you can do is setting the queryOptions of the GetListItems to:

<QueryOptions>
   <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
</QueryOptions>

But it'll remove the fields you listed, but only other required fields.
In SP2010 you can set it to

<QueryOptions>
   <IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns>
   <ViewFieldsOnly>TRUE</ViewFieldsOnly>
</QueryOptions>
share|improve this answer
    
Sadly, that doesnt work. Could the fact that I'm using Sharepoint 2007 be the reason? –  Philip Daubmeier Apr 16 '12 at 19:59
    
Yes, that was added in 2010 –  Per Jakobsen Apr 17 '12 at 4:08
    
Thanks for your answer. Do you know if theres any possibility to do the same with SP 2007? –  Philip Daubmeier Apr 17 '12 at 11:59
    
Sorry last comment was wrong, It's ViewFieldsOnly which is new in 2010. IncludeMandatoryColumns is in 2010 but doesn't remove fields which SharePoint thinks are important, but it gets rid of required fields not included in your ViewFields, so if you want minimal response you should include it, but there is no way in SP2007 to get rid of the fields you listed in the question –  Per Jakobsen Apr 17 '12 at 16:47
    
Ok, so I guess I have to live with it :). Thank you for the details! –  Philip Daubmeier Apr 18 '12 at 13:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.