AnsweredAssumed Answered

XML Issue in Web Service Call Action

Question asked by iza on Jul 12, 2018
Latest reply on Jul 14, 2018 by iza

Hello - I have been struggling with the web service call to webpartpages.asmx web service and calling "AddWebPart" method with the following simple (bare minimum) SOAP request message and keeps on getting "The remote server returned an error: (400) Bad Request." message. I tried the same webpart xml in a standalone .NET application and it works. It just does not work in Nintex Action. Also I tried to checkout the page before calling the action below. I even tried to escape and replace double quotes. Even tried to encode but no thing works.

 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:m="http://microsoft.com/sharepoint/webpartpages">
<soap:Header>
</soap:Header>
<soap:Body>
<m:AddWebPart>
<m:pageUrl>https://123xyz.com/Pages/Default.aspx</m:pageUrl>
<m:webPartXml><WebPart><Assembly>Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly><Title>Content Editor</Title><ZoneID>Zone1</ZoneID><Description>Allows authors to enter rich text content.</Description><TypeName>Microsoft.SharePoint.WebPartPages.ContentEditorWebPart</TypeName><Content><![CDATA[Hello]]></Content></WebPart></m:webPartXml>
<m:storage>Shared</m:storage>
</m:AddWebPart>
</soap:Body>
</soap:Envelope>

 

Any help will be appreciated.

 

Thanks

Outcomes