keyongtech


  keyongtech > sharepoint.* > sharepoint.windowsservices.development > 04/2006

 #1  
04-10-06, 10:00 AM
Youenn Trebossen
Hi,

I'm currently working on a Winform Application which interact with a WSS
site via Web Services. I need to create Document Libraries,
pre-populate them with a dozen document templates, and create custom
columns in the document Library.
So, i created by hand this template document library, and save it as
template. However, i can't find a way to create new document libraries
based on this template using the AddList(listName, Description,
templateID) method of the Lists Web Service.

So, is it possible to create a document Library based on a template
using Sharepoint Services ?
Are there other ways to do it ?

Thanks in advance.

Youenn
 #2  
04-11-06, 02:55 PM
tumbleweed
Hi,

I had sort of the same problem where I needed to add the SmartPart
which used a custom user control to populate the doc library with a set
of defined fields. What I did was create a custom document library list
in a custom site definition (web server extensions/60/template/1033/
etc etc). I suppose you could do this in one of the standard site
definitions but MS does not like that.

Anyway, to cut a long story short; the new doc library template
(taxonomy document library) was available to create in all wss sites
that were created with the custom template (TAXDOCLIB - based off the
DOCLIB definition).

I always prefer to create new definitions rather than creating
templated off the front-end.
 #3  
04-11-06, 03:12 PM
Phil
Youenn,

I create a doc library from a template in WSS. I don't use the web
service methods but instead do it in a C# web part. Maybe you will
find something in my code helpful:

SPListTemplate template = web.Site.GetCustomListTemplates(web)[
DOC_TEMPLATE_NAME ];
System.Guid docLibGuid = web.Lists.Add(
DOC_LIB_NAME, DOC_LIB_DESCRIPTION, template );

-Phil


Youenn Trebossen wrote:
[..]
 #4  
04-11-06, 03:15 PM
David McKenzie
You can do this in the OM, but AFAIK the Lists Web Service limits you to the
predefined list templates.
SO
You could code yopur own Web Service
or, alternativly, try creeating the schema for your custom list by hand.
Of the two, the former seems easier to me.
You could use WSSDAL as a model.
http://blogs.msdn.com/asanto/archive...02/383939.aspx
 #5  
04-14-06, 06:03 AM
Bob Mixon
Youenn,

Unfortunately, no; not using the Lists.AddList Web Service and the approach
you are using. You will need to create a custom Web Service and create the
document library from there.

I have not personally tried this, but one other thought that comes to mind
would be to create a new document library list definition; which uses a new
and unique template ID. This approach would be very quick and simple to
test if you have ever created a list definition before.

------------------------
Bob Mixon
Microsoft SharePoint Portal Server MVP
(Blog) http://bobmixon.xwiki.com
------------------------
[..]
 #6  
04-14-06, 06:24 AM
Bob Mixon
Youenn,

In my previous post I didn't mean to imply I have never created a custom
document library list definition; I have created many. What I meant was,
I have not tried this to see if calling the Lists.AddList with the new document
library template ID.

Hopefully that makes more sense! :)

------------------------
Bob Mixon
Microsoft SharePoint Portal Server MVP
(Blog) http://bobmixon.xwiki.com
------------------------
[..]
 #7  
04-17-06, 04:19 PM
David McKenzie
I have a web part which creates a new site from a site template , then adds a
pre-populated document library with a few custom views from a list template.
This works repeatedly and reliably.
Similar Threads
DocLib with Versioning in custom template

Hello, I have create a custom template, with one doclib. But by default, the doclib don't manage doc versioning. How can i activate document versioning in my custom template...

Template in sharepoint Server 2003 and Sharepoint Services

Hi All, I was using sharepoint portal server 2003 , i need to upload some template and use them. but i am not able to use them .it seems in Sharepoint portal server 2003...

Repost: DocLib & Template

Hi everybody, I'm here reposting my problem. Can anyone help me? I've set up a portal with many areas (I called them "Folders", but the are the original "Topics") dedicated...

SharePoint 2003 DocLib Upload Problem...

One of my users of the SharePoint site is having a problem with uploading document to a document library. He's created several nested folders within a document library, and...

SharePoint Team Services Template

I am creating a small team services site for a client and I applying a set layout for the site (style sheets, tables etc) however I am having a few issues with applying the...


All times are GMT. The time now is 11:22 PM. | Privacy Policy