Topic
1 reply Latest Post - ‏2013-05-13T17:25:30Z by Richard_Good
A1BM_Alberto_Gandara
1 Post
ACCEPTED ANSWER

Pinned topic How to connect with web service

‏2013-05-13T12:34:56Z |

Hi all,

I want to connect doors with a web service. for example: i want to connect with a web service temperature conversion (http://www.w3schools.com/webservices/tempconvert.asmx) and I want to introduce one value in doors(dxl) and give me back the correct value.

 

Anyone could help me with some idea or similar script?

 

Thanks

  • Richard_Good
    Richard_Good
    56 Posts
    ACCEPTED ANSWER

    Re: How to connect with web service

    ‏2013-05-13T17:25:30Z  in response to A1BM_Alberto_Gandara

     Try using a  win32SystemWait_ call, best to keep it simple if possible, example below: -

     //function to check if we are running windows 7
    bool isItWindows7() {
     string tmpfile = getenv("TEMP")
     tmpfile = tmpfile "\\thisVer.txt"
     string res
     win32SystemWait_("cmd /C ver > \"" tmpfile "\"", res, syswaitINFINITE_)
     //read piped file into variable
     string thisVer = readFile(tmpfile)
     if( matches("Version 6", thisVer)) {
      return true
     }
     else {
      return false
     }
    }

    Updated on 2013-05-13T17:38:03Z at 2013-05-13T17:38:03Z by Richard_Good