This project has moved and is read-only. For the latest updates, please go here.

AddWebPart to page

Jan 18, 2013 at 12:48 AM

I'm trying to use the the AddWebPart method of the WebPartPages web service.  I can get the example to work for a content editor web part, no issue there. What I really need to do is to add web parts of existing document libraries.

I can't see to find any documentation on what the XML syntax is for document libraries. Has anyone used this before or know where I can look to find the XML required to add a web part to a page for an existing document library?

This is XML I've tried so far to no avail:


<?xml version="1.0" encoding="utf-8"?>
<WebPart xmlns:xsi="" xmlns:xsd="" xmlns="">
  <Title>Project Files</Title>
  <Description />
  <ZoneID>Zone 3</ZoneID>
  <Height />
  <Width />
  <DetailLink />
  <HelpLink />
  <PartImageSmall />
  <MissingAssembly>Cannot import this Web Part.</MissingAssembly>
  <PartImageLarge />
  <IsIncludedFilter />
  <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
  <ListName xmlns="{D1C5BACF-34F9-4C0D-96C8-85E035663BDC}</ListName>">">{D1C5BACF-34F9-4C0D-96C8-85E035663BDC}</ListName>
  <ListId xmlns="</ListId></WebPart>">">D1C5BACF-34F9-4C0D-96C8-85E035663BDC</ListId>
Jan 18, 2013 at 1:14 AM

Think I finally found my answer,