GVO 2007 - Add file to subfolder error

D

dumian

Hi,

I have an problem on adding files to an specific subfolder of the root tool
, in case that with same code adding folders and files but to the root it
works, only when i set the targetfolder URI value and the FolderID i get an
Soap error with XML Element. Same it is happend if i set the root URI or
TargetFolderURI as request value and the FolderID with the subfolder name
that i want to use . Here is the code snippet that i use :

GrooveFiles.GrooveFilesBase64 FilesBase64WebService = new
GrooveFiles.GrooveFilesBase64();
FilesBase64WebService.GrooveRequestHeaderValue = new
GrooveFiles.GrooveRequestHeader();
FilesBase64WebService.GrooveRequestHeaderValue.GrooveIdentityURL =
m_IdentityURL;
FilesBase64WebService.GrooveRequestHeaderValue.GrooveRequestKey =
GrooveRequestKey;

if (i_TargetFolderURI == "")
FilesBase64WebService.Url = GrooveHost + Data + "/$ComponentGroup";
else
FilesBase64WebService.Url = GrooveHost + i_TargetFolderURI;

GrooveFiles.FileDescriptor FileDescriptor = new
GrooveFiles.FileDescriptor();
FileDescriptor.DisplayName = i_FileName;
FileDescriptor.Name = i_FileName;
FileDescriptor.FolderID = m_sSubFolderID;
if(m_nType==0)
FileDescriptor.Type = "Folder";
else if(m_nType==1)
FileDescriptor.Type = "File";
AddedFileID = FilesBase64WebService.Create(FileDescriptor, i_FileContents);

Thank you in advance,
cosmin
 
H

Hugh Pyle [MSFT]

For this line
FileDescriptor.FolderID = "Test"; //already existing folder

the FolderID should be the ID, not the displayname, of the folder in which you want to create the new file or folder.

For example if you have enumerated folders in the tool and received a FileDescriptor fd describing the folder in which you want to create the new file, then
FileDescriptor.FolderID = fd.ID; // ID of already existing folder

--
Hugh Pyle / Program Manager / Microsoft Office Groove
http://blogs.msdn.com/hughpyle/

This posting is provided "AS IS" with no warranties, and confers no rights.


in message Hi,

i don't realy now what is wrong while, without adding the /$ComponentGroup to the webservice URI, nothing works, even to create files or folders in the root as before.

here is the snippet, on goove 2007 does not work at all, and i verify all possible reasons : content size in case of files, response validation of soap header key and so on. And with the same code if i let uncommented the root folder name, works for addition of files and folders but not into subfolders.
 
D

dumian

Hi Hugh,

thank's for pointing this out, i have see it later on your blog too.
the important point is that shud be somewhere in the SDK docs in any case, at least on the release ones.

regards,
Cosmin
For this line
FileDescriptor.FolderID = "Test"; //already existing folder

the FolderID should be the ID, not the displayname, of the folder in which you want to create the new file or folder.

For example if you have enumerated folders in the tool and received a FileDescriptor fd describing the folder in which you want to create the new file, then
FileDescriptor.FolderID = fd.ID; // ID of already existing folder

--
Hugh Pyle / Program Manager / Microsoft Office Groove
http://blogs.msdn.com/hughpyle/

This posting is provided "AS IS" with no warranties, and confers no rights.


in message Hi,

i don't realy now what is wrong while, without adding the /$ComponentGroup to the webservice URI, nothing works, even to create files or folders in the root as before.

here is the snippet, on goove 2007 does not work at all, and i verify all possible reasons : content size in case of files, response validation of soap header key and so on. And with the same code if i let uncommented the root folder name, works for addition of files and folders but not into subfolders.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top