From: sandersiep on
Hello,

I am new to the MOSS2007 and sharepoint 2007.
Does anyone have an example how to import a document/file into the
document library of Sharepoint 2007.


I found out that I have to use SubmitFile from the OfficialFile
webservice, but I have no idea how to fill the parameters.
This is what I am trying right now:


byte[] UploadFile = null;// = fileBytes;
RecordsRepositoryProperty[] RecRepProp = new
RecordsRepositoryProperty[1];
RecRepProp[0] = new RecordsRepositoryProperty();
RecRepProp[0].Name = "Casenr";
RecRepProp[0].Type = "string";
RecRepProp[0].Value = "1";
string RecordRouting = "";
string SiteURL = "/SiteDirectory/Title/SubTitle";
string UserName = "user";
string Result = recordsRepository.SubmitFile(UploadFile,
RecRepProp, RecordRouting, SiteURL, UserName);
Result = Result;


What is RecordRouting? Can someone give me an example how it has to
work?


Thank you in advance!
Sander

From: madhur on
Sander ,

See

http://msdn2.microsoft.com/en-us/library/ms492872.aspx
http://msdn2.microsoft.com/en-us/library/ms471285.aspx

sandersiep wrote:

> Hello,
>
> I am new to the MOSS2007 and sharepoint 2007.
> Does anyone have an example how to import a document/file into the
> document library of Sharepoint 2007.
>
>
> I found out that I have to use SubmitFile from the OfficialFile
> webservice, but I have no idea how to fill the parameters.
> This is what I am trying right now:
>
>
> byte[] UploadFile = null;// = fileBytes;
> RecordsRepositoryProperty[] RecRepProp = new
> RecordsRepositoryProperty[1];
> RecRepProp[0] = new RecordsRepositoryProperty();
> RecRepProp[0].Name = "Casenr";
> RecRepProp[0].Type = "string";
> RecRepProp[0].Value = "1";
> string RecordRouting = "";
> string SiteURL = "/SiteDirectory/Title/SubTitle";
> string UserName = "user";
> string Result = recordsRepository.SubmitFile(UploadFile,
> RecRepProp, RecordRouting, SiteURL, UserName);
> Result = Result;
>
>
> What is RecordRouting? Can someone give me an example how it has to
> work?
>
>
> Thank you in advance!
> Sander

From: kieranmdbrennan on

I've tried something similar. I have a window app that calls the code
as you have above but I get the following error message when it runs.
this is a Soap exeception. I can't see how the error occurs.
Server was unable to process request. ---> Value cannot be null.
Parameter name: String"
What errors do you get?


On Oct 16, 11:09 am, "madhur" <ahuja.mad...(a)gmail.com> wrote:
> Sander ,
>
> See
>
> http://msdn2.microsoft.com/en-us/library/ms492872.aspxhttp://msdn2.microsoft.com/en-us/library/ms471285.aspx
>
>
>
> sandersiep wrote:
> > Hello,
>
> > I am new to the MOSS2007 and sharepoint 2007.
> > Does anyone have an example how to import a document/file into the
> > document library of Sharepoint 2007.
>
> > I found out that I have to use SubmitFile from theOfficialFile
> > webservice, but I have no idea how to fill the parameters.
> > This is what I am trying right now:
>
> > byte[] UploadFile = null;// = fileBytes;
> > RecordsRepositoryProperty[] RecRepProp = new
> > RecordsRepositoryProperty[1];
> > RecRepProp[0] = new RecordsRepositoryProperty();
> > RecRepProp[0].Name = "Casenr";
> > RecRepProp[0].Type = "string";
> > RecRepProp[0].Value = "1";
> > string RecordRouting = "";
> > string SiteURL = "/SiteDirectory/Title/SubTitle";
> > string UserName = "user";
> > string Result = recordsRepository.SubmitFile(UploadFile,
> > RecRepProp, RecordRouting, SiteURL, UserName);
> > Result = Result;
>
> > What is RecordRouting? Can someone give me an example how it has to
> > work?
>
> > Thank you in advance!
> > Sander- Hide quoted text -- Show quoted text -