{{tag>category:"OpenInsight 32-Bit" author:"Tony Lillyman" author:"Bob Carten"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Built-in Support for XML Web Services (OpenInsight 32-Bit) ==== === At 01 JUN 2006 11:22:10PM Tony Lillyman wrote: === I have to answer this question in respect to OI. 4. Does this platform (OI) include built-in support for the consumption of XML Web Services? Can anyone provide and answer and also enlighten me on how this might be achieved. Thanks in Advance Tony ---- === At 05 JUN 2006 12:53AM Bob Carten wrote: === The short anwswer is that there is not built-in support for consuming web services. Consuming a web service usually involves sending a POST request to the service using the postwebpage routine, then parsing the reponse. This is doable, the trick is to get the WSDL file and determine the correct format for the payload you need to send to the web server. Microsoft created a COM object which does a lot of the work for you. While it is deprecated in favor of .Net, it works quite well. Given the OLE functionality in OI 7.21, you can use the MS toolkit to consume web services Below is an example: function Soap_Call_Example(City) /* ** Consume a web service using MSSOAP toolkit ** The example web service whas eather For two cities ** ** OpenInsight version 7.21 ** ** See http://www.microsoft.com/downloads/details.aspx?familyid=c943c0dd-ceec-4088-9753-86f052ec8450&displaylang=en ** ** rjc 06-05-2006 Created ** */ ans=' If Assigned(city) Else city=' If city=' Then city=Istres' End // Location of the web service url=http://www.severalways.org/WS/BerreWeather/BerreWeather.php?wsdl" // Create the COM object oSOAP=OleCreateInstance("MSSOAP.SoapClient") // Connect to the service x= OleCallMethod(oSOAP, 'mssoapinit', url) // Call the GetWeather Service oResults=oSoap-]GetWeather("Istres") // The service returns an array of values (really a set of XML Nodes) // Convert to an FM / VM delimited array of Name/value pairs cnt=oResults-]Length For i=0 To cnt-1 oResult=oResults-]Item(i) ans[i]=oResult-]NodeName : @vm : oResult-]Text Next Return ans ---- === At 05 JUN 2006 03:52AM Tony Lillyman wrote: === Thanks Bob Much appreciate the explanation of this process. It is VERY new concept to me, but as with most things OI/Windows I expected that it could be done. So much I dont understand about the interfacing to Windows/Web services etc. Regards Tony [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=545669DE2B3D486F8525718100128280|View this thread on the Works forum...]]