Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jacob Bach Pedersen 19 posts 73 karma points
    Dec 11, 2014 @ 11:16
    Jacob Bach Pedersen
    0

    Fetching data from external source

    Hey

    We need to fetch som data from an external API and present the data on a Umbraco page.

    How would you recomend doing that. Is it possible the make a scheduled job runnning every night, fetching the data and the present i at a page on the site?

    /Jacob

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 11, 2014 @ 14:51
    Richard Soeteman
    0

    Hi Jacob,

    Depending on the data you could use CMSImport to get the data. The pro version allows you to schedule jobs. If the format is not generic you could write your own Data provider. Find more info on our website http://soetemansoftware.nl/cmsimport

    Best,

    Richard

  • Jacob Bach Pedersen 19 posts 73 karma points
    Dec 11, 2014 @ 14:58
    Jacob Bach Pedersen
    0

    Richard Soeteman: Nice. I will try the Free edition first. If it works you got at new customer :)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Dec 11, 2014 @ 16:03
    Richard Soeteman
    0

    Great to hear! Thanks and please let me know when you have any questions.

  • Jacob Bach Pedersen 19 posts 73 karma points
    Jan 20, 2015 @ 13:18
    Jacob Bach Pedersen
    0

    Hej Richard

    Its it possible to see at example of a XML-filen including images that your system can import?

  • Jason Espin 368 posts 1335 karma points
    Jan 20, 2015 @ 14:59
    Jason Espin
    0

    Hi Jacob,

    We run a nightly update on our websites that update the Umbraco CMS using the built in Content Service and an external web service. Currently this is accessed via a standard.aspx page placed in the Umbraco directory but we are looking at porting it over to using WebApi. There is a built in scheduler in Umbraco which you could get to periodically run a method within WebApi to trigger the update but in my experience the Umbraco scheduler is unreliable particularly if your IIS server does not keep your website in scope under periods of low traffic. The alternative we use therefore is to setup a scheduled task on our web server that calls our .aspx page (or WebApi) which then triggers the update.

    Cheers,

    Jason

  • Jacob Bach Pedersen 19 posts 73 karma points
    Jan 20, 2015 @ 15:05
    Jacob Bach Pedersen
    0

    Jason: Do your have an example of the code fetching data?

  • Jason Espin 368 posts 1335 karma points
    Jan 20, 2015 @ 15:15
    Jason Espin
    1

    Hi Jacob,

    The code that fetches data is essentially just a service reference to a WSDL which in Visual Studio becomes a useable object. You can then use this object and its property values to retrieve content / data which you can then input into Umbraco using the ContentService.

    Unfortunately the examples I have at the moment are confidential but I can try and put and example using a web service that is available on the web at some point.

    Cheers,

    Jason

  • Aleksejs Kanarciks 10 posts 80 karma points
    May 01, 2019 @ 09:28
    Aleksejs Kanarciks
    0

    Hej, Jason. Maybe you still have this code and you can share it? This post are first in Google, so maybe solution for those who are looking for this solution are the best to share? :) Maybe not exactly, but edited version to hide companies confidential information? :)

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 20, 2015 @ 15:49
    Richard Soeteman
    0

    Hi Jacob,

    Sure do you need to schedule things or can your customer upload a file and images in a zip file?

    @Jason I'm about to release CMSImport V3 where the scheduled task is inside a httpmodule much more reliable than first.

    Best,

    Richard

  • Jacob Bach Pedersen 19 posts 73 karma points
    Jan 20, 2015 @ 15:51
    Jacob Bach Pedersen
    0

    Need to schedule it using a external service returning XML.

  • Richard Soeteman 4046 posts 12899 karma points MVP 2x
    Jan 20, 2015 @ 17:40
    Richard Soeteman
    0

    Hi Jacob,

    Below the xml file and media folders I use to import from xml. To test this, put the media folders img and files in the root of your umbraco installation with CMSImport pro installed. If you don't have a license please send an email to [email protected] with the domain you want to test it on and I create a trial license for you.

    https://www.dropbox.com/sh/y0w13ch3bbjhhpp/AACTuvtu7v0Z3oE0yq38cR8Za?dl=0

    This could be a nice test. But it's best to test against the xml returned from the service since xml can be very generic. And also because the media reference is propably not the same as in the sample I send you. Most clients I worked with that consume services wrote their own Dataprovider to tweak the xml and downloading of images etc.

    Best,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft