1

I don't have much experiences with web services at all, but i hope someone here can give me some advice on how to create what i'm searching, or at least point me in the direction of a useful tutorial.

Here goes:

I have a news section, with news items. Example of the path: content\home\news\ (here all news items are stored as seperate items).

Now i wanna take the news title and text fields, and export those for viewing on another website, on another domain (not running in a sitecore solution). I think the smartest solution for this, is to use webservices or am i wrong?

And if it is, how can i do this the easiest way in a web service? I tried to find some documentation on how to do this, but haven't had any luck in doing so. Some example code would be nice.

Really hope someone here can contribute with a little help, would be much appreciated.

  • 3
    If I were doing that then I'd look first if I could use the RSS capabilities, e.g. http://www.sitecore.net/Community/Technical-Blogs/John-West-Sitecore-Blog/Posts/2010/12/Custom-RSS-Feeds-with-the-Sitecore-ASP-NET-CMS.aspx or http://adeneys.wordpress.com/2009/12/09/sitecore-6-2-rss/. – Steve Campbell Aug 21 '12 at 20:13

1 Answers1

3

I agree with steve, the fast way to get this working is with RSS. Then on the other end, outside of sitecore, you could parse the rss right on the page via javascript: Parse RSS with jQuery

Community
  • 1
  • 1
Brian
  • 31
  • 1
  • I tried using RSS. The problem is, that my news items are getting created and published programmatically from the front-end. And if a user, is using the site in other languages than english, the items will also get the same language. So is there any way, to make the same RSS feed show all versions of the same type of item? Or maybe make the item in english only by default. My publish code is like the following: Database database = Factory.GetDatabase("web"); PublishManager.PublishItem(item, new[] { database }, LanguageManager.GetLanguages( database).ToArray(), false, false); –  Aug 22 '12 at 08:58
  • Then I would suggest that creating a WCF service and pulling the items in your class. Then try converting them to english type. Pass to the other domain or let other domain consume your service. – RG-3 Aug 22 '12 at 23:36