8 Replies Latest reply on Oct 1, 2015 6:21 AM by RafaelCaballe

    Consuming SAP Web Services from FileMaker

    RafaelCaballe

      Hello,

       

      I need to consume a SAP Web Service from a FileMaker solution. The service uses a SOAP Protocol, so I have to generate and .xml request to the web service and it will return an .xml. The last one will need some parsing to extract the result of the request.

       

      I have learnt that this kind of situations was solved in the past with the FM Nexus Web Services Plug-in. The plug-in "read" the WSDL document, which in essence defines the web service functions, and created a bunch of external functions that could be used right from our FileMaker calculation dialog. These functions automatically generated the request .xml file to be submitted to the web service.

       

      Additionally, the plug-in provided some functions to parse the .xml returned by the web service by using XPATH syntax. So it was a nice round solution!

       

      It seems that this plug-in is not available anymore. I can't download it from this link. What has happened to this plug-in? If it is really discontinued, it is a huge loss for the whole FileMaker community. Web Services are the most common way to communicate among systems, much more than ODBC. So we need an alternative way to handle Web Services from within FileMaker!

       

      Does anyone know any alternative way to accomplish what I have described?

       

      Thanks,

      Rafa

        • 1. Re: Consuming SAP Web Services from FileMaker
          mikebeargie

          360works offers a few plugins that can easily handle SOAP:

          SOAP web protocol and FileMaker | FileMaker

          scriptmaster is free to use, but requires you to learn a bit of java.

           

          There's also the free BaseElements plugin from goya, TroiURL plugin, and MonkeyBreadSoftware that can do it via cURL.

           

          Here's a previous thread that has exhaustive explanations of the options:

          "Insert from URL" SOAP Web Service Request?

          • 2. Re: Consuming SAP Web Services from FileMaker
            RafaelCaballe

            Hi Mike,

             

            Thanks for your help. I have been looking for a while to all these links and some more. I found that the issue is too complicated for me. The only approach it could has sense for me is to find somebody that could develop the Java code to create a ScriptMaster module and corresponding FileMaker function.

             

            I need to consume 4 Web Services (SAP), so I guess that 4 different modules should be created. I am open to receive quotes of anybody that could be interesting in developing these modules.

             

            Thanks,

            Rafa

            • 4. Re: Consuming SAP Web Services from FileMaker
              ibrahim_bittar

              Hola Rafa

               

              The best guy I know for building scripts in Groovy (the language that uses ScriptMaster) is John Renfrew. He's smart and very approachable.

               

              Saludos

              • 5. Re: Consuming SAP Web Services from FileMaker
                jrenfrew

                Thanks Ibrahim..

                wrong way round coherent kris - SOAP coming in not going out.

                Lets talk Rafa...

                ScriptMaster is my preferred route where you are building against a know WDSL.

                 

                And for the interested SoapUI is a free, open-source, multi-OS tool that really helps here.

                 

                john

                • 6. Re: Consuming SAP Web Services from FileMaker
                  worldcloud

                  I have used both of the plug-ins above and completely agree that the XML route is far superior to what I'm about to mention; however, I'm working against the largest SAP installation in existence as a part of a contract with a fruit company we all know. Although SAP offers Web Services, policies from IS&T prevent those functions from being used to push any data into SAP.

                   

                  The FileMaker database I am working with needs pull data from SAP and then create credit, invoice, and clearing documents. The only 'approved' method for this client is AppleScript. As someone who is managing 430 AppleScripts to communicate, I would be interested in starting a dialog with you.

                   

                  I would be happy to share our experience here and I would be interested to see if you had any input on how we could overcome IS&T objections to SAP Web Services..

                   

                   

                  thanks,

                   

                   

                  Joe

                  • 7. Re: Consuming SAP Web Services from FileMaker
                    RafaelCaballe

                    Hello,

                     

                    I have not solved the issue yet...but I will do it! I summarise hereunder all steps I have taken and the point where I am:

                     

                    1. Following jrenfrew suggestion I have used the SoapUI-5.2.0 open source version. I have created a project and passed it the url where the WSDL is located.
                    2. SoapUI allows me to see the XML request (enclosed) that is created out from the WSDL along with the url (endpoint) where the  request is sent.
                    3. Then, still within SoapUI, I have submitted the request to the endpoint and, successfully, get back and XML (enclosed) with all the information.
                    4. Then I have moved to FileMaker and set up a TestSAPWebServices.fmp12 file (enclosed) which contains a single script. The script tries to set a variable with the XML provided as a result from the Web Service.
                    5. In the script I use BE_HTTP_POST (url; parameters {; username ; password })
                    6. As a "url" I use a $url set to the endpoint url.
                    7. As a "parameters" I use a $xml which is a literal text set in the same script.
                    8. Username and password are also two variables.
                    9. When I run the script I do not get anything in the $result, nor any error at all...

                     

                    I do not know how to proceed further...

                     

                    Rafael

                     

                    Enclosed files:

                    1. XML request generated by SoapUI out from the WSDL
                    2. XML response generated by SoapUI
                    3. TestSAPWebService.fmp12 ( see script Get Result From WebService)
                    • 8. Re: Consuming SAP Web Services from FileMaker
                      RafaelCaballe

                      Hello again...


                      Solved


                      The only missing parts in the last post was the need to set a pair of custom headers:

                      1. BE_HTTP_Set_Custom_Header ( "Content-Type" ; "text/xml;charset=UTF-8" )
                      2. BE_HTTP_Set_Custom_Header ( "SOAPAction" ; "urn:sap-com:document:sap:soap:functions:mc-style:ZPP_WS_011:ZppWs011Request"

                      With that in place everything works like a charm!


                      After that, with the help of BE_XPathAll function, I got all the info into global vars ready to be loaded into my tables.


                      Thanks to ibrahim_bittar for pointing me in the right direction, to jrenfrew for all the help he has provided me and finally to Nicholas Orr, from Goya ,who gave me details ofnhow to use BaseElement plugin functions.


                      Rafael