Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Sharing list across multiple sites & Keeping the list synch

  Asked By: Amos    Date: Dec 17    Category: Sharepoint    Views: 8362

I have two queries

1- Can we share a list on one Sharepoint Site with another?
2- Is there any simple way to keep a certain Sharepoint list
synch with some external data store, like table in SQL Server, XML?
Or I will need to write a custom job for it ƒ¼

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Irvin Foley     Answered On: Dec 17

There are many ways to view a list  outside of its Site boundaries.

In the browser:
1. Using the Page Viewer Web Part
2. Using the Web Capture Web Part

In FrontPage 2003:
3. Using "Add to Catalog" and the data  View Web Part (DVWP) for Lists in Sites
in the same Virtual Server
4. Using Lists.asmx Web Service and the DVWP for Lists in Sites in other Virtual
Servers

In VS.NET:
5. Using Lists.asmx Web Service and a custom  Web Part for Lists in Sites in any
Virtual Server
6. Using the WSS API and a custom Web Part

My current favorite is #4.

Keeping a SharePoint list in sync with an external  data store  would be possible,
but why? If you want to view external data from within SharePoint, use the DVWP.
If you want access to a SharePoint list from an external application, use the
SharePoint API. There are certainly situations when it is needed, but it is
rarely wise to duplicate data.

 
Answer #2    Answered By: Deonte Stein     Answered On: Dec 17

I'm very interested in accessing list  data from an external  application. Is
there an SPS web service call (like Lists.asmx) I can make that would return the
data in xml or csv perhaps?

 
Answer #3    Answered By: Stephon Valentine     Answered On: Dec 17

You picked my favorite: Lists.asmx

Do you need instructions on how to use Lists.asmx?

 
Answer #4    Answered By: Leif Cardenas     Answered On: Dec 17

You can access the SPPT Lists.asmx Web Service remotely just like any other Web
Service. In VS.NET you can simply add a Web Reference and then use the proxy
stub that VS.NET generates to access the WebMethods in the same way that you
access public methods of any object. Here are the steps and some code:

1. Right click on References in the Solution Explorer and choose "Add Web
Reference" from the resulting context menu
2. Type in the URL to the Web Service WSDL (Web Service Definition Language).
For WSS you would use: http://[topSite]/_vti_bin/Lists.asmx?WSDL
or: http://[topSite]/[childSite]/_vti_bin/Lists.asmx?WSDL
For SPS you would use: http://[portal]/_vti_bin/Lists.asmx?WSDL
or: http://[portal]/[area]/Lists.asmx?WSDL
or: http://[portal]/[Cn]/[area]/Lists.asmx?WSDL
or:
http://[portal]/sites/[topSite]/_vti_bin/Lists.asmx?WSDL
or:
http://[portal]/sites/[topSite]/[childSite]/_vti_bin/Lists.asmx?WSDL
_vti_bin is a virtual directory on any SPPT site  that holds all Web Services.
Fun fact, vti stands for Vermeer Technologies Incorporated, the creators of
FrontPage that Microsoft acquired.
3. Press Enter to locate the Web Service
4. Revise the Web reference name (if you want) and click the Add Reference
button.
5. Consume the Web Service. Some VB.NET code follows for a Web reference to
wss01

'VB.NET
'Create a local variable
Dim lists As wss01.Lists = New wss01.Lists

'Give it the current security context
lists.Credentials = System.Net.CredentialCache.DefaultCredentials

'Retrieve ListItems from the task list  into an XML Node
Dim items As System.Xml.XmlNode = lists.GetListItems("Tasks", Nothing,
Nothing, Nothing, Nothing, Nothing)

'Output the number of child nodes returned
Response.Write("XML Child Nodes: " + items.ChildNodes.Count.ToString() +
" ")

//Retrieve an XML node containing all the ListItems in the Tasks list (you
could use the list GUID if you prefer):
//This is an untested solution.
System.Xml.XmlNode items = lists.GetListItems("Tasks");

Lists.asmx has the following public WebMethods:
AddAttachment
Adds an attachment to the specified list item in the specified list.

AddList
Creates a list in the current site based on the specified name, description,
and list template ID.

DeleteAttachment
Removes the attachment from the specified list item.

DeleteList
Deletes the specified list.

GetAttachmentCollection
Returns a list of the URLs for attachments to the specified item.

GetList
Returns a schema for the specified list.

GetListAndView
Returns the list and view schemas for the specified list.

GetListCollection
Returns the names and GUIDs for all the lists in the site.

GetListItemChanges
Returns changes made to the list since the specified date and time.

GetListItems
Returns information about items in the list based on the specified query.

UpdateList
Updates a list based on the specified field definitions and list properties.

UpdateListItems
Updates the specified items in a list on the current site.

You can find additional information (although not much) here:
msdn.microsoft.com/.../...ListItems_SV01034381.asp

 




Tagged: