Search Wiki:
Project Description
Web service that provides data for Slide.Show from a given directory. It takes album names from nested directories. That way data is extracted from file system containing pictures (slides) in folders.


Actually this is a custom implementation of IXmlSerializable interface, that provides custom formated web service output. That way we get the appropriate XML for Slide.Show application. Solution consist of two parts:
- Custom serializator that takes data tables containing albums and slides
- Interface that creates data tables from given folder containing slides (pictures). The album names are extracted from the name of the directory.

Web service also includes caching, and multi threading for better performance.

More information can be found at http://www.terpinc.com/default.aspx?id=24

Quick instalaton guide

Copy the bin directory, web.config and CustomSerializator.asmx to the directory containing your pictures, then provide Slide.Show with the data source from the URL of the web service.

After copying the files (be sure that folder is set as an application in IIS service configuration) you need to provide Slide.Show’s configuration.xml with following data provider: http://yourCustomUrl/customSerializator.asmx/GetAlbumsPictures

<dataProvider type="XmlDataProvider" >
    <option name="url" value="http://yourCustomUrl/customSerializator.asmx/GetAlbumsPictures"> </option>
  </dataProvider>


Additional attributes to the data tag can be added in web.config. Use SSWS_ + data tag attribute name in web.config

That’s it. It should work as planned.

There are two web methods implemented at the time:
- GetAlbumsPictures – it loops through first level of folders, and gets the containing pictures. Album names are set from the names of the directories.
- GetRandomPictures - gets the pictures from the root folder, but skips the pictures from the folders. It return’s pictures in random order.

Backlink:
Additional information on starting a new project is available here: Project Startup Guide.
Last edited Feb 20 at 10:43 AM  by boryto, version 4
Comments
jrblack10 wrote  Mar 12 at 5:32 PM  
Wow, this is great. Thanks for sharing.
Any ideas on how we could improve this to also get or generate Slide Title and Description? Possibly from a file in the image folder? Or set Slide Title = name of file and set Description = "Photographed by Joe Smith Studio"?

boryto wrote  Jun 3 at 12:01 PM  
Just added the support for slide title. It is generated from Filename. If you want, you can implement description. All you have to do is to add column named "description" to Slides DataTable. The filename generation is included in 0.92 release.

deepankar wrote  Jun 19 at 4:39 PM  
When i use the webservices its not working, gives me a javascript error, xml parsing failed

boryto wrote  Jul 7 at 5:43 PM  
First put just the url of web service in the browser, nad check if the XML is in the right form.
Then pase the url to the configuration file. If the XMl is OK, then it should work.

Updating...