Consuming Web Services with 3.13...

Discussion about recent product features & solutions!
1 post • Page 1 of 1
vogler
Posts:122
Joined: Thu Oct 28, 2010 8:32 am

Consuming Web Services with 3.13...

Post by vogler »

With WinCC OA 3.13 it is very easy to consume web services.

A simple example is to send alerts to an app by push notifications (by Windows Azure Cloud).

http://www.winccoa.net/index.php?solution_id=1020

* Download this panel: http://rocworks.at/share/rocworks.pnl

* Download and install this Android-App on your android phone: http://rocworks.at/share/rocworks.apk

* Android Barcode Scanner must be installed: https://play.google.com/store/apps/deta ... nt.android

* Start the panel and scan the QR-Code with the App (top right menu button "scan")

* You can create your own distribution channel with a click on "create new QR code" in the panel and scan it with your phone(s).

Ctrl Script Functions: netPost, netGet, jsonEncode, jsonDecode

//-----------------------------------------------------------------------------------------------------
void sendNotification(string msg)
{
mapping data;
mapping result;
mapping headers;
mapping object;

headers["Content-Type"]="application/son";
headers["X-ZUMO-APPLICATION"]=g_application_key;

data["headers"]=headers;

object["projecttoken"]=g_project_key;
object["text"]=msg;
object["complete"]=false;

data["content"]=jsonEncode(object);

netPost("https://rocworks.azure-mobile.net/tables/todoitem", data, result);
DebugTN(result);
}

1 post • Page 1 of 1