Hi,I try to upload the .docx file to the interwoven using webservice. It is working fine.when i open the document(.docx) from the Interwoven, it open the Office 2007 but i am getting that file got corrupted. when i click the Ok button. it shows the content.code to upload file: Dim fileName As String = IO.Path.GetFileName(localSourceFilePath) Dim documents As Document() = New Document(0) {} documents(0) = New Document() documents(0).Content = ReadFile(localSourceFilePath) Dim profile() As ProfileItem 'Add list of attributes to be set to this array Dim profileAttributeName() As String = {PROFILE_CLASS, PROFILE_TYPE, PROFILE_OPERATOR, PROFILE_DESC, PROFILE_AUTHOR} 'Initialize the values fo the above attributes in this list Dim profileDetails As New List(Of String) profileDetails.Add(DEFAULT_DOCUMENT_CLASS) ' IWOVDocType is a valid document type value defined in the database. Dim IWOVDocType As String = String.Empty Try IWOVDocType = GetTypeFromExt(IO.Path.GetExtension(fileName).Substring(1)) Catch IWOVDocType = DEFAULT_DOCUMENT_TYPE End Try profileDetails.Add(IWOVDocType) profileDetails.Add(connectionInfo.Credential.UserName) profileDetails.Add(IO.Path.GetFileNameWithoutExtension(fileName)) profileDetails.Add(connectionInfo.Credential.UserName) 'Pass the array of attributeNames and list of values to this private method profile = GetDocumentProfile(profileAttributeName, profileDetails) documents(0).Profile = profile documents(0).Security = GetDocumentSecurity(connectionInfo.Credential.UserName) Dim input As New CreateDocumentsInput() input.Documents = documents input.OutputProfile = GetOutPutProfile() input.DestinationID = GetFolderIDFromPath(connectionInfo, workspaceName, relativeDestinationPath) input.OutputMask = GetDocumentOutputMask(True, True, True, True) input.UseFolderProfile = True Dim output As CreateDocumentsOutput = connectionInfo.Connection.IWOVServices.CreateDocuments(input)I have attached the screen shot of the error.Can any one tell what might be the problem. how to solve this errror message.
' ~~ Import Document Example ~~ ' Build required profile fields Dim arrProfile(6) As ProfileItem 'Required arrProfile(0) = New ProfileItem() arrProfile(0).AttributeID = imProfileAttributeID.imProfileAuthor 'Author arrProfile(0).Value = "JYEE" arrProfile(1) = New ProfileItem() arrProfile(1).AttributeID = imProfileAttributeID.imProfileOperator 'Operator arrProfile(1).Value = "JYEE" arrProfile(2) = New ProfileItem() arrProfile(2).AttributeID = imProfileAttributeID.imProfileType 'Type arrProfile(2).Value = "WORD" arrProfile(3) = New ProfileItem() arrProfile(3).AttributeID = imProfileAttributeID.imProfileClass 'Class arrProfile(3).Value = "DOC" 'Optional arrProfile(4) = New ProfileItem() arrProfile(4).AttributeID = imProfileAttributeID.imProfileCustom1 'Client arrProfile(4).Value = "5400" arrProfile(5) = New ProfileItem() arrProfile(5).AttributeID = imProfileAttributeID.imProfileCustom2 'Matter arrProfile(5).Value = "Y" arrProfile(6) = New ProfileItem() arrProfile(6).AttributeID = imProfileAttributeID.imProfileDescription 'Desc arrProfile(6).Value = "Test Import thru Web Service" ' Set document security policy Dim sec As ObjectSecurity = New ObjectSecurity() Dim newacl(0) As AclItem newacl(0) = New AclItem newacl(0).Type = AclType.User newacl(0).Name = "JYEE" newacl(0).Right = imAccessRight.imRightAll sec.DefaultVisibility = imSecurityType.imPrivate sec.Acl = newacl ' Create a document object Dim newdoc As New Document newdoc.Database = "WS8DSSWEB" newdoc.Profile = arrProfile newdoc.Content = ReadFile("J://Temp//My test file.doc") newdoc.Security = sec Dim arrDoc(0) As Document arrDoc(0) = newdoc Dim ProfileAttribute(3) As imProfileAttributeID ProfileAttribute(0) = imProfileAttributeID.imProfileComment ProfileAttribute(1) = imProfileAttributeID.imProfileDescription ProfileAttribute(2) = imProfileAttributeID.imProfileType ProfileAttribute(3) = imProfileAttributeID.imProfileSubType Dim doxInput As New CreateDocumentsInput() doxInput.DestinationID = "!nrtdms:0:!sessionSS_WIN2003SERV:!database:WS8DSS1:!folderrdinary,10:" doxInput.Documents = arrDoc doxInput.OutputMask = OutputMask.Profile doxInput.OutputProfile = ProfileAttribute 'doxInput.UseFolderProfile = True Dim doxOutput As New CreateDocumentsOutput() doxOutput = WSWSvcs.CreateDocuments(doxInput) Dim arrErr = doxOutput.Errors Dim arrImportedDox = doxOutput.Documents Dim importedDoc As Document = arrImportedDox(0) MsgBox(importedDoc.ObjectID) Me.Close()
This looks like a problem inherent with the WSW app. ...I have WSW 8.2 (no patches) and its WORDX is mapped to Word97.