Quantcast
Viewing all articles
Browse latest Browse all 10096

SharePoint 365 OfficialFile.asmx SubmitFile error

Hi all - I am trying to submit a file from my local hard-drive to my SharePoint 365 Document Center.My Document Center has a Content Organizer activated to route the document. I have authenticated and am able to use the RecordsRepository web service to GetServerInfo so I know I am authenticated correctly.

I am a member of the Records Center Publishers Group too.

When I use SubmitFile I keep getting <ResultCode>NotFound</ResultCode> Error - my code follows

string filePath = doc.FullName.Replace(@"\\", @"\");
var properties = new List<RecordsRepositoryProperty>
                {
                    new RecordsRepositoryProperty() {Name = "Title", Type = "Text", Value = doc.Name},
                    new RecordsRepositoryProperty() {Name = "Name", Type = "Text", Value = doc.Name},
                    new RecordsRepositoryProperty() {Name = "ContentTypeId", Type = "Text", Value = contentTypeId},
                    new RecordsRepositoryProperty() {Name = "ContentType", Type = "Text", Value = "Client Document"}
                };

string sourceUrl = filePath;
string userName = @"xxx@hubone.com";
var serverInfo = proxy.GetServerInfo();

byte[] fileContent = System.IO.File.ReadAllBytes(doc.FullName);
var result = proxy.SubmitFile(fileContent, properties.ToArray(), "Client Document", filePath, userName);

Any help greatly appreciated!!!!


Laurence Lemmon-Warde


Viewing all articles
Browse latest Browse all 10096

Trending Articles