NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Sibuya on March 28, 2016, 04:34:24 PM
-
Hi,
Sorry for my ignorance, I'm new in NT. But I would like to know where I find documentation about NetWebServerWorker.
I would like to know for example what is the difference between SetSessionValue and SSV and some other methods like Script and so on.
Thank you.
Cheers,
Marcos
-
Hi Sibuya, my recommendation is to get the book from Bruce from this link. Is worth every penny!
http://capesoft.com/books/nettalk/home.htm
About SSV, is the short version of SetSesionValue (does the same)
p_web.SSV('loc:SomeValue','Some Value') or equivalent p_web.SetSsessionValue('loc:SomeValue','Some Value')
To get the value assigned to the session you use this
p_web.GSV('loc:SomeValue') or p_web.GetsessionValue('loc:SomeValue')
Another place you can get help is the Weekly webinars and the past webinars from Bruce. Very useful and a lot of examples using NetTalk for web servers
Cheers
-
Hi Urayoan,
The book enlighted me a lot but I still have some difficulties.
For example. I can see in WebServer log a GET message with SetSessionValue an a Value (string in Base64 correct form) followed by a POST with this value with all "+" replaced by spaces. So when trying to get this value with GetValue() I got with these spaces in Base64 string. Is that correct?
Thank you.
Cheers,
Marcos
-
Hi Marcos,
>> So when trying to get this value with GetValue() I got with these spaces in Base64 string. Is that correct?
I think you need to post screen-shots or something of what you are seeing. Or better yet come to one of the user group webinars.
It's hard to comment on what you are seeing without seeing it.
http://www.capesoft.com/accessories/NetTalkUserGroup.htm
cheers
Bruce
-
I seems that nettalk urldecodes all incoming gets when you do the getvalue requests.
NetWebServerWorkerBase.GetValueFormat
of net:IsNumber
returnvalue = self.DformatNumber(self._LocalDataQueue.Value,self._LocalDataQueue.Picture)
!str.KeepChars('01234567890.-')
!returnvalue = str.GetValue()
of net:IsTyped ! space up, plus 13,10
str.RemoveChars('<0,1,2,3,4,5,6,7,8,9,11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31>')
returnvalue = str.GetValue()
of net:OnlySpaceup ! only keeps chars 32 and up.
str.RemoveChars('<0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31>')
returnvalue = str.GetValue()
so if the text is only not urlencoded and only has pure base 64 it truncates some characters..
you'll need to get the value some other way that is not the getvalue method or Bruce needs to gives us a raw way to get the value.
there might already be a way, I just don't know it.
Best Regards...
Roberto Renz
-
Hi Roberto,
There are standards regarding how URLs work, and how the data on the URL is encoded.
So, if you post an "incorrect" URL on the sending side, you naturally get an inaccurate result of the receiving side.
I recommend you use the StringTheory method, URLEncode, to encode the parameters correctly when constructing the URL on the sending side.
http://www.capesoft.com/docs/StringTheory/StringTheory.htm#stUrlEncode
cheers
Bruce