I have to create a communication via http
first I have to send:
GET http://000.000.000.000:8118/sso-vs/sess ... [sessionid]
then I get back over the same http connection:
<?xml version="1.0" encoding="UTF-8"?>
<sessioninfo valid=[true/false)>
<username>String</username>
<grouptype name=String>
<scope>String</scope>
</grouptype >
<expiredAt>systemtime</expiredAt>
</session info>
I guess first I have to rmake an httpconnect()
When the treaty is finished, I close the http connection with httpdisconnect()
how do I send the "GET http ....."?
How can I intercept the xml string and evaluate the individual values ?
GET HTTP and XML
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: GET HTTP and XML
Hi,
NetGet is the function to send GET from WInCC OA to a web-service. No need to do httpConnect if you don't need to expose web-service from WinCC OA
Pity that your server reply is xml and not JSON. In this case you'll need to parse xml using xmlDocumentFromString function. Then you can use xmlNodeValue function to get any individual value knowing the key. Be careful I also see attributes in your sample so you may need xmlGetElementAttribute as well.
BR
Alexandre
NetGet is the function to send GET from WInCC OA to a web-service. No need to do httpConnect if you don't need to expose web-service from WinCC OA
Pity that your server reply is xml and not JSON. In this case you'll need to parse xml using xmlDocumentFromString function. Then you can use xmlNodeValue function to get any individual value knowing the key. Be careful I also see attributes in your sample so you may need xmlGetElementAttribute as well.
BR
Alexandre