6 Replies Latest reply on Nov 15, 2011 7:16 AM by hborch

    Importing xml from web services

    hborch

      Hello

       

      I have a database system for biology where I have to update information on species, their names etc. from a webservice every week. To do that I am offered a webservice that I can send request to and receive xml back. I will therefor set up a script that runs in the night and import 100 000 species names. The service is on this adress:

       

      http://webtjenester.artsdatabanken.no/Artsnavnebase.asmx/TaksonFraID?TaksonID=4515

       

      The XML I get back seems to me to be understandable though I have never worked with XML/XSL before. I understand that I need some XSL stylesheet to avoid the error message I get when I try import -> XML data source;

      "XML/XSL information is not enough to proceed with import/export."

       

      Is there somebody out there that can help me with this task? I even may pay something for it if somebody could write it ready for me so that "It just works"!!

       

      Happy for all kind of help!!

      Best regards

       

      Håkon Borch

        • 1. Re: Importing xml from web services
          nickorr

          Håkon,

           

          Yes, you do need to use XSLT to import XML.  If you'd like a primer on this all works with regards to FileMaker, there are a couple of posts on my blog which talk about this.  They're centered around the DDR, but could apply equally to any XML source : http://www.goya.com.au/blog/understanding-and-using-database-design-report-part-1

           

          If you want more than that, there is a good book on FileMaker and XML by Beverly Voth : http://www.amazon.com/FileMaker-Developers-Guide-Wordware-Library/dp/155622043X  Although it's written for FMP 6 the same concepts still apply and it's still valid.

           

          If you don't want to get into this yourself, I'd be happy to help.  The XML you linked to above looks quite simple although it's not entirely clear to me what it is representing.  Perhaps with a little assistance on the language and words being used, I could come up with a starting plan to get an import working.

           

          Cheers,

          Nick

          1 of 1 people found this helpful
          • 2. Re: Importing xml from web services
            hborch

            Hello

            Thanks for quick answer!

            I have limited of money on this project so I can not say go ahead without having an idea of what it will cost, but definitely I prefer to buy a solution out of the box. I have to much to do these days to sit down and learn XML. If you could give it a thought and suggest a price for a running solution I will se what I can do with the money.

            Regarding the script that I will set up I thought of just looping a http request with the command increasing the taksonID with 1 each time, sarting with 1 until it reach 150 000. Then I will have a record set with all species in Norway, their taxonomic hierarchy, their names in Norwegian and scientific names, old names and current names etc. The language problem is probably not so big. Here are a list of fields that can occur with their english translation ( You may remember from biology classes in school if you are not familiar with the subject. More can be read on http://en.wikipedia.org/wiki/Biological_classification.  ;

             

            LatinskNavn = Scientific name

            KategoriID=  Category ID

            Kategori=  Category

            LatinskNavnID= Scientific name ID

            Underrike = Sub Kingdom

            Rekke = Phyllum

            Underrekke = Sub phyllum

            Overklasse = upper class

            Klasse = class

            Underklasse = sub class

            Infraklasse = infra class

            Kohort = ?

            Overorden = upper order

            Orden = order

            Underorden = under order

            Infraorden= infra order

            Overfamilie = upper family

            Familie = family

            Underfamilie = sub family

            Tribus = tribus

            Undertribus = sub tribus

            Slekt = genus

            Underslekt = sub genus

            Seksjon = section

            Art = Species

            Underart = sub species

            Varietet = variety

            Form = form

            VitenskapligNavn>

            Autorstreng = Author (name of the person who first described the species)

            Gruppe = group

            Popularnavn = popular name (specie name in Norwegian)

            Navn = Name

            Anbefalt = (name) recomended

            Spraak = language

            FinnesINorge = occur in Norway

            Hovedstatus = main status

            Takson = taxon

             

             

             

            Attached also a file with fields and script for a start in the work.

             

            Best regards

            Håkon Borch

             

            ••••••••••••••••••••••••••••••••••••••••••••

            BorchBio as

            v/ Håkon Borch

            Bassengveien 8

            N-1512 Moss

            Tlf  (mob):  970 676 85

            Tlf: 69 27 69 70

            Fax: 69 27 69 71

            E-post: hakon@borchbio.no

            WEB: www.borchbio.no

            ••••••••••••••••••••••••••••••••••••••••••••

             

             

             

             

             

            Den 15. nov. 2011 kl. 01:13 skrev NicholasOrr:

             

             

            created by NicholasOrr in Advanced Discussion - View the full discussion

            Håkon,

             

             

            Yes, you do need XML.  If you'd like a primer on this all works with regards to FileMaker, there are a couple of posts on my blog which talk about this.  They're centered around the DDR, but could apply equally to any XML source : http://www.goya.com.au/blog/understanding-and-using-database-design-report-part-1

             

             

            If you want more than that, there is a good book on FileMaker and XML by Beverly Voth : http://www.amazon.com/FileMaker-Developers-Guide-Wordware-Library/dp/155622043X  Although it's written for FMP 6 the same concepts still apply and it's still valid.

             

             

            If you don't want to get into this yourself, I'd be happy to help.  The XML you linked to above looks quite simple although it's not entirely clear to me what it is representing.  Perhaps with a little assistance on the language and words being used, I could come up with a starting plan to get an import working.

             

             

            Cheers,

             

            Nick

             

            Reply to this message by replying to this email -or- go to the message on FileMaker Technical Network

            Start a new discussion in Advanced Discussion by email or at FileMaker Technical Network

            Manage your email preferences.

             

            FileMaker Developer Conference 2012 • Miami, Florida • July 16-18 • www.filemaker.com/devcon

             

            • 3. Re: Importing xml from web services
              nickorr

              Håkon,

               

              I've attached some basic sample files to get you started.  In terms of importing 150,000 times, this is certainly possible, but time consuming.  It might be worth trying to get a copy of the full XML output as this XSLT code will work on either one record or all records at once.

               

              Also in the data set, there are really three tables.  The first is the main Taxon, and within that ( in your example at least ), there is also multiple Popularnavn records and also multiple LatinskNavn records.  So you need three imports to get all the data.  Have a look at my sample table and compare it to the XML content and you can see it lines up with each type.

               

              You may be able to pre-populate the Taxon records as there isn't actually much info in there, so that might not be required.

               

              Also the Taxon and Popularnavn data is complete in terms of the sample data you've shown me, but the LatinskNavn area has a lot of fields and I haven't added them all in.  Hopefully it's clear enough what I've done and you can fill out the rest of the fields and details without too much trouble.  If not, let me know.

               

              Cheers,

              Nick

               

              Nicholas Orr

              Goya Pty Ltd

              BaseElements : www.baseelements.com

              RefreshFM : www.refreshfm.com

              • 4. Re: Importing xml from web services
                Malcolm

                I can't see the attachments. Do they go out with the emails or do we have to go to the web site to collect them?

                 

                Malcolm

                • 5. Re: Importing xml from web services
                  nickorr

                  Malcolm,

                   

                  I'm not sure, I don't get the email I sent .  But I think they are all on the site.  Use the links to find the exact details.

                   

                  Cheers,

                  Nick

                   

                  ---

                  Nicholas Orr

                  Goya Pty Ltd

                  BaseElements : www.baseelements.com

                  RefreshFM : www.refreshfm.com

                  • 6. Re: Importing xml from web services
                    hborch

                    Hello

                    I have now the script up and running, thanks to your help. Please take contact on hborch@me.com to discuss payment.

                    Best regards

                     

                    Håkon Borch