7 Replies Latest reply on May 31, 2012 1:09 AM by ProgramDesign

    Communicating with SOAP-web service

    ProgramDesign

      Can Troi URL be used to communicate with a SOAP-web service ? I've build the SOAP-XML manually and want to pass it to the server to get back the XML result. Will this work, and if so, how should I write the FileMaker Script ?

        • 1. Re: Communicating with SOAP-web service
          nickorr

          ProgramDesign,

           

          Yes, the Troi URL plugin will do this sort of thing for you.  You also might be able to use our free BaseElements plugin ( http://www.goya.com.au/baseelements/plugin ) to do the same, depending on the exact requirements.

           

          As to building the script, the plugin calls are made as part of a calculation, so you usually set a field or a variable to a value that the plugin function returns.  The details of the calculation depend on the details of the web service you're calling.  Is it a public service?  If so, which one, we may be able to help.  Otherwise I'd download the troi plugin and have a look at their example files.

           

          Cheers,

          Nick

          • 2. Re: Communicating with SOAP-web service
            ProgramDesign

            I finally got things working by building the SOAP-request manually and sending it to the server using Troi URL with a couple of tweeks to the settings. Unfortunately, now I've got a new challenge: the response is UTF8-encoded (I think?) and FileMaker can't seem to make sense of characters like Æ, Ø and Å. Any thoughts on how I can resolve this issue ? I've tried FileMakers ConvertToText and Troi Files ConvertToFmText, but neighter seems to do anything usefull. Any other ideas ?

            • 3. Re: Communicating with SOAP-web service
              user14135

              The only suggestion I can come up with is to use the TROI plugin to write the response to a file, then import the XML. Not sure it will work, but it's one avenue to explore.

              • 4. Re: Communicating with SOAP-web service
                wimdecorte

                The 360works ScriptMaster plugin has modules to use use SOAP and parse the returning XML without having to go through a text file on the machine.

                • 5. Re: Communicating with SOAP-web service
                  DrewTenenholz

                  ProgramDesign --

                   

                  I've integrates with SOAP systems using a couple of plugins.  My favorite choice is the FMNexus Web Services plugin, since it saves me a huge amount of work.  It requires that the SOAP system designers wrote a complete WSDL for the plugin to read, but if that is ready to use, then the Web Services plugin simply creates functions very like native FileMaker ones, complete with a function prototype telling you what elements to send to the service and gets back the response in a useful way.

                   

                  As you note Troi-URL gets the raw response that you then have to deal with including decoding and parsing.  I have used the Fre 360Works ScriptMaster plugin to handle some of that, since it has both decoding and XPath parsing as functions included in the sample file.

                   

                  -- Drew Tenenholz

                  • 6. Re: Communicating with SOAP-web service
                    ProgramDesign

                    I looked at the ScriptMaster-plugin a while back, but descided not to spend more money on this prosject purchasing plugins. Of course, if it's free that argument goes straight out the window. I'll give it a go and post back when I eighter get things working or get frustrated again : )

                     

                    Thanks!

                    • 7. Re: Communicating with SOAP-web service
                      ProgramDesign

                      The customers IT-department descided that Java should be avoided at any cost, so I ended up building a Custom Function that converts the most used characters in the norwegian language from FileMakers interpretation of UTF-8 to ANSI (Æ, Ø, Å, É, etc.):

                       

                      Substitute ( Text ; [ "Æ" ; "Æ" ] ; [ "Ø" ; "Ø" ] ; [ "Ã…" ; "Å" ] ; [ "É" ; "É" ] )