Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sharepoint web services  RSS feed

Mohammad Akon
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Not sure if this is the right place for this kind of post!!

I am using Lists.asmx web service within my Java Client to retrieve data ((list of files with their attribute such as Name, author, Date Modified, etc.)) from the sharepoint server. The attributes associated with each list item are displayed as a column header in the sharepoint server. For example:

Sharepoint allows the user to change the column headers, e.g. I can change column header "MyColumn" to "YourColumn".

To do this I am sending the following soap request:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
<GetListItems xmlns="" >
<listName>Test Area</listName>
<Query xmlns:ns2="" xmlns="">
<OrderBy><FieldRef Name="FileLeafRef" /></OrderBy>
<FieldRef Name="ID" /><FieldRef Name="Title" /><FieldRef Name="Editor" /><FieldRef Name="Author" /><FieldRef Name="Modified" /><FieldRef Name="Created" /><FieldRef Name="UniqueId"/>
<QueryOptions xmlns:ns2="" xmlns=""><IncludeMandatoryColumns>FALSE</IncludeMandatoryColumns><ViewAttributes Scope="Recursive" />
<Folder>Test Area/</Folder>
</soap:Envelope>Folder>Test Area/</Folder>

And the response I am getting is something like:

<listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns="">
<rs:data ItemCount="2">
<z:row ows_GUID="{3C5844E1-4F98-4EE5-A789-1DCCA3E1BF3A}" ows_ContentType="DB Base Content Type" ows_BaseName="key facts 8 April" ows_Modified="2009-03-13 17:31:30" ows_EncodedAbsUrl="https://localhost/site/a.txt" ows__ModerationStatus="0" ows__Level="1" ows_ID="1" ows_owshiddenversion="3" ows_UniqueId="1;#{B7ED8578-227D-4202-B18A-369BFE5F28A0}" ows_FSObjType="1;#0" ows_Created_x0020_Date="1;#2008-12-12 16:18:48" ows_ProgId="1;#" ows_FileLeafRef="1;#a.txt" ows_FileRef="1;#site/Test Area/a.txt" ows_DocIcon="txt" ows_Editor="25657;#mohammad" ows_MetaInfo="1;#vti_parserversion:SR| vti_modifiedby:SR|localhost\\mohammad ContentTypeId:SW|0x010100C777E5E4CC2845A982076CBB472177EA00D40C3F427C6AD44FA3313036C6D99659 vti_title:SW| ContentType:SW|DB Base Content Type test:SW|test vti_author:SR|localhost\\mohammad MyColumn:SW|comment1" ows_Last_x0020_Modified="1;#2009-03-13 17:31:31" />

Now, even if I change "MyColumn" to "YourColumn", with the same soap request I am getting the same response, where as it should give "YourColumn".

Is there anything I can do to get the changed column header?

Any help is appreciated.

Thanks in advance.

Matt Zollinhofer
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My response is a bit late, but in case you're still tracking this I'll throw out a comment. And I'm not exactly sure what you're asking for, but it sounds to me like you want to know how to send a message to a Sharepoint list to change one of the list's column names.

If that is correct, one of the things I noticed is that you're calling GetListItems. I don't think that's the method of the web service that you want to call. I think you want to call UpdateListItems. Check out this page for more details: UpdateListItems at MSDN. Search for "column" on the page and you'll see an example of how to update that. I haven't updated column names myself, but I have inserted new items using that method so I'd think that should work too.

Keep us posted.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!