I am new to Interwoven. I try to consume Interwoven web service GetDocuments to get a document, and receive the following error message, please help! Thanks.
The request failed with HTTP status 401: Unauthorized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
Source Error:
Line 224: [return: System.Xml.Serialization.XmlElementAttribute(Namespace="
http://worksite.imanage.com")]Line 225: public GetDocumentsOutput GetDocuments([System.Xml.Serialization.XmlElementAttribute("GetDocuments", Namespace="
http://worksite.imanage.com")] GetDocumentsInput GetDocuments1) {
Line 226: object[] results = this.Invoke("GetDocuments", new object[] {
Line 227: GetDocuments1});
Line 228: return ((GetDocumentsOutput)(results[0]));
The code is as the following:
//access the web service
IWOVservices.IWOVServices wsWorkSite = new IWOVservices.IWOVServices();
wsWorkSite.Credentials = System.Net.CredentialCache.DefaultCredentials;
wsWorkSite.PreAuthenticate = true;
IWOVservices.GetDocumentsInput docInput = new IWOVservices.GetDocumentsInput();
//search databases
docInput.ObjectIDs = new string[] { "2301401" };
IWOVservices.GetDocumentsOutput docResults = wsWorkSite.GetDocuments(docInput);