A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Friday, February 23, 2007

Showing web service data in a Data View web part

Originally posted: Sat, Feb 24, 2007
Reposted: Aug 26, 2007
Some of the links might not work as this version was retrieved from a web archive. If you find any dead links, kindly send an email to share.point@yahoo.com with the URL of this page. Thank you!
We can use a data view web part to show information retrieved through a web service. All you need is a web service link. Showing web service data in SharePoint sites is very easy if you use SharePoint Designer. I have already published all this information in another post but because this is a totally different topic, I thought I should publish it as a separate post.
For this walk through, I have used a TechnoService web service. You can use any other web service.
1. Open a SharePoint site (Where you want to deploy the web service) in SharePoint designer.
2. Select Manage Data Sources... from  the "Data View" menu. This will open the "Data Source Library" pane on the right side.
3. Expand the "XML Web Services" node and click Connect to a web service.
4. Enter the web service reference in the Service description location. If you installed the web service in the root application then the path will look like this:
Leave all other options as they are and click the OK button.
5. Select Insert Data View... from the "Data View" menu. This will add a data view web part to the page.
6. Click the link shown in the data view web part. This will open the Data Sources Library if it's not already open.
7. Right click the web service that you added to the "XML Web Services" node in the "Data Sources Library" and click Show Data.
Data returned from your web service will be displayed.
8. Click the Insert Selected Fields as... drop down and select Single Item View.
9. That's it. Save the page and if you want to add some style to the data view web part, right click the data view web part and select Modify > Table AutoFormat. It will show you several options. Select the option of your choice and your data view web part is ready.
You can apply formatting to the output returned by the web service manually as well. Anyway, here is how the data view web part looked in my SharePoint site after applying some styles:
I changed the title and applied auto formatting.

No comments:

Post a Comment