call ulc/start.html with parameters

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
5 posts • Page 1 of 1
marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

call ulc/start.html with parameters

Post by marcel.gay@wimag.ch »

I receive the start / call of the ULC-UX with parameters which I have to process
Control Manager is webclient_http.ctl
I can't start à HTTP-Connection on the same Ports, According to the help, A http server with port 8110 is used in the project
Is there a way to record my own parameters?
Exemple:
https://192.168.100.75/data/ulc/start.h ... ionid=1234
Parameter sessionid is value "1234"

Version: WinCC-OA 3.16P16
allowPanelParam = 1 is set in config

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: call ulc/start.html with parameters

Post by adaneau »

Hi,

From documentation ULC UX supports only a handful of predefined parameters:

*size
*panel
*png
*lang
*touch

For solving your issue I would use httpCOnnect to register a webservice with my customs parameters and url. Then as reply from a query I would redirect into ULC UX page to start client. However you need to be very careful with multiple users to associate your session ID to the relevant one.

Best regards
Alexandre

marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

Re: call ulc/start.html with parameters

Post by marcel.gay@wimag.ch »

The parameter evaluation works well with the HTTP server and httpConnect

But i've some problems with the redirect into ULC UX page to start client.
call is:
http://192.168.100.100/?sessionid=username
I tried:
1. return "<html>names:" + names + "- values:" + values + "- user:" + sUserName + "</html>";
2. return "<html>http://192.168.100.75/data/ulc/start.ht ... .pnl</html>";
3. return "<html><a href=""http://192.168.100.75/data/ulc/start.html?panel=
vision/StartWindow.pnl"">Start</a></html>";
4. return "<html><meta http-equiv=""refresh"" content=""2; URL=http://192.168.100.75/data/
ulc/start.html?panel=vision/StartWindow.pnl""></html>";

1 Ok -> print out user (root), names (sessionid) and values (useename) in browser
2 Ok -> show link as text im html-page
3 Ok -> show link "start" to click
4 it does not work -> should start page http://192.168.100.75/data/ulc/start.html?panel=
vision/StartWindow.pnl
(ok -> test of example 4, content in html file and start working with double click on html file)

what is allowed after return and what is not, how can i redirect into ULC UX page to start client from httpconnect ?

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: call ulc/start.html with parameters

Post by adaneau »

Hi,

Following code works with WinCC OA 3,17 and firefox:

Code: Select all

//--------------------------------------------------------------------------------
// used libraries (#uses)
#uses "CtrlHTTP"


//--------------------------------------------------------------------------------
// variables and constants

//--------------------------------------------------------------------------------
/**
*/
main()
{
  httpServer(FALSE, 8081, 553); /* installs the HTTP Server */
  httpConnect("example", "/firstExample");
}
string example()
{
  return "<html>"
   "<head>"
      "<title>HTML Meta Tag</title>"
      "<meta http-equiv = \"refresh\" content = \"3; url = https://localhost:553/data/ulc/ulc.html?panel=vision/login.pnl\" />"
   "</head>"
   "<body>"
   "   <p>Redirecting to another URL</p>"
   "</body>"
"</html>";
}

marcel.gay@wimag.ch
Posts:62
Joined: Thu May 07, 2015 6:55 pm

Re: call ulc/start.html with parameters

Post by marcel.gay@wimag.ch »

perfect, it works in Firefox, Chrome, MS Internt Explorer + Edge
Thank you !

5 posts • Page 1 of 1