Setting WebPart for Meteorology in sharepoint

No.of Views1089
Bookmarked0 times
Downloads 
Votes0
By  André Lage   On  10 Jun 2010 10:06:34
Tag : SharePoint , Design and Customization
The SharePoint is one of those tools that we stop and explore before doing development, one of the great capacity of Sharepoint is its integration with other Web technologies which makes it very flexible and full customization of the pages simple and direct.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

The SharePoint is one of those tools that we stop and explore before doing development, one of the great capacity of Sharepoint is its integration with other Web technologies which makes it very flexible and full customization of the pages simple and direct.
For this type of development, have a sharepoint Webpart called DataViewWebpart "that performs the call given by various layers of data from Sharepoint Lists, WebServices, Database and XML.
Webpart used to design the XSL formant "Extensible Stylesheet Language"which is a layer that serves to design models in different Webpart, provided you have the same type of data to receive.
This article shows how we can use to access data in XML WebPart Drawing with XSL, and aims to create a WebPart of Meteorology.

Set up XSL to content

Before you start creating WebPart have to draw the structure as our Webpart will stay for that we can use Sharepoint Designer 2007 and use the (DVWP) DataViewWebPart, call our need to call the WebService DataSource of Meteorology Google.

Example

WebService Google's Meteorology (Google provides a webservice to access the state time through a set of parameters.)

Example: % http://www.google.com/ig/api?weather=sao 20paulo & hl = en
Parameters:
Weather: City where we are researching the Meteorology
hl: Language in which the content is translated, pt-PT (Portugal), pt-BR (Brazil) 

Image Loading

While calling the WebService, I intend to remain in the XML file in order to work and make changes. 

Image Loading

After creating the XML file, we can use the option "Datasource Library" to make a preview of our data and select and import. 

Image Loading

After we select the fields to import and add the Datasource fields to be imported from a simple flat. 

Image Loading

After you import the fields you want to use the WebServices can use HTML to draw the final result of the Webpart. 

Image Loading

Once created the changed data of the output of our WebPart, you should copy your content from "<Xls: stylesheet" up "</ xls: stylesheet">, this content will be used for setting the XML WebPart.

Image Loading

Configure XML WebPart

Already in the Sharepoint page, we added our "XML WebPart" and we can start configuring. 

Image Loading

In Edit mode of WebPart, showing where we can define our XML data, in this case I set our WebService Google's meteorological.
In fields:
XML Link: We should add the link where the content of our XML WebService in this case Google.
XSL Editor: The copy of the contents of the XSL held in Sharepoint Designer 2007 we move to this content editor, where you will be the structure of the WebPart of Meteorology.
 

Image Loading

Done, now it's only doing "OK" and our WebPart is ready to be available on Sharepoint. 

Image Loading

Here is another example of how we can use what comes by default Sharepoint without performing any development, just change the XSL and services available over the internet in a way, simple simple.

Annex "Microsoft Stock - MSFT_Stock.dwp
Annex "Graphics Scholarship" Google, Microsoft, Oracle, Sybase "
 

Example

Image Loading

More about

If you wish to change the images that the service's API provides google for something more personalized you can change the path.


images / weather / chance_of_rain.gif
images / weather / sunny.gif
images / weather / mostly_sunny.gif
images / weather / partly_cloudy.gif
images / weather / mostly_cloudy.gif
images / weather / chance_of_storm.gif
images / weather / rain.gif
images / weather / chance_of_rain.gif
images / weather / chance_of_snow.gif
images / weather / cloudy.gif
images / weather / mist.gif
images / weather / storm.gif
images / weather / thunderstorm.gif
images / weather / chance_of_tstorm.gif
images / weather / sleet.gif
images / weather / snow.gif
images / weather / icy.gif
images / weather / dust.gif
images / weather / fog.gif
images / weather / smoke.gif
images / weather / haze.gif
images / weather / flurries.gif

Conclusion

A big hug to everyone and I hope you enjoyed this article more.

 
Sign Up to vote for this article
 
About Author
 
André Lage
Occupation-Not Provided
Company-Not Provided
Member Type-Senior
Location-Portugal
Joined date-09 Jun 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top