Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SOAP AddWebPartToZone always adds the webpart to the same zone

$
0
0

hello everybody.

I am trying to add webparts to a webpartpage via SOAP / REST.
Therefore I am using the SOAP Method AddWebPartToZone (from webpartpages.asmx Web Service).

My Webpartpage has two WebPartZones: "Zone 1" and "Zone 2".
But no matter which zone I use for zoneId in the request body the web part is always added to "Zone 2".

Do you have any idea why this is happening?

This is how the body of my SOAP request looks like:

<?xml version="1.0" encoding="utf-8"?><soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"><soap12:Body><AddWebPartToZone xmlns="http://microsoft.com/sharepoint/webpartpages"><pageUrl>/sites/ideas4u/Pages/abcxyz.aspx</pageUrl><webPartXml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;&lt;webParts&gt;&lt;webPart xmlns=&quot;http://schemas.microsoft.com/WebPart/v3&quot;&gt;&lt;metaData&gt;&lt;type name=&quot;Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; /&gt;&lt;importErrorMessage&gt;Cannot import this Web Part.&lt;/importErrorMessage&gt;&lt;/metaData&gt;&lt;data&gt;&lt;properties&gt;&lt;property name=&quot;ListUrl&quot; type=&quot;string&quot;&gt;/sites/ideas4u/Lists/MyList&lt;/property&gt;&lt;property name=&quot;MissingAssembly&quot; type=&quot;string&quot;&gt;Cannot import this Web Part.&lt;/property&gt;&lt;/properties&gt;&lt;/data&gt;&lt;/webPart&gt;&lt;/webParts&gt;</webPartXml><storage>Shared</storage><zoneId>Zone 1</zoneId><zoneIndex>1</zoneIndex></AddWebPartToZone></soap12:Body></soap12:Envelope>



Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>