App.config:
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Authentication" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" useDefaultWebProxy="true" />
<binding name="BasicHttpBinding_Collaboration" />
<binding name="BasicHttpBinding_DocumentManagement" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="2:10:00" allowCookies="false" bypassProxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" useDefaultWebProxy="true" />
<binding name="BasicHttpBinding_MemberService" />
<binding name="BasicHttpBinding_WorkflowService" />
<binding name="BasicHttpBinding_ContentService" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="2:10:00" allowCookies="false" bypassProxyOnLocal="false" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483648" useDefaultWebProxy="true" transferMode="Streamed" messageEncoding="Mtom" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/DocumentManagement.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_DocumentManagement" contract="CWS.DocumentManagement" name="BasicHttpBinding_DocumentManagement" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/Authentication.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Authentication" contract="CWS.Authentication" name="BasicHttpBinding_Authentication" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/Collaboration.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Collaboration" contract="CWS.Collaboration" name="BasicHttpBinding_Collaboration" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/ContentService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ContentService" contract="CWS.ContentService" name="BasicHttpBinding_ContentService" />
<endpoint address="http://kbg1oecwp1.kongsberg.fmcweb.com/cws/MemberService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_MemberService" contract="CWS.MemberService" name="BasicHttpBinding_MemberService" />
</client>
</system.serviceModel>
The used service is "BasicHttpBinding_DocumentManagement".
The code to create a folder with the metadata details
folderResult = documentManagementClient.CreateFolder(ref oAuth, Convert.ToString(filteredDataTable.Rows[i]["cmthistory"]) == "C" ? parentId :
subFolderId, folderName,
docType != "Correspondence" ?
filteredDataTable.Rows[i]["DocTitle"].ToString() : filteredDataTable.Rows[i]["corressubject"].ToString(), folderMetadata);
upon executing the above step the following error threw
Error in deserializing body of request message for operation 'CreateFolder'.
The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'AddArticle'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 60, position 267.