PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 25 → WM - Como tratar conexão lenta ou sinal muito fraco com o Windev Mobile e webservice?
WM - Como tratar conexão lenta ou sinal muito fraco com o Windev Mobile e webservice?
Started by BOLLER, Oct., 31 2016 10:20 PM - No answer
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on October, 31 2016 - 10:20 PM
Boa noite

Entao...

Se usar webservice tudo é possivele com garantia de dados

Para isso webservice deve ter no metodo:

- o token de segurança = senha unica que só existe no servidor
- o md5 do que sera enviado
- o que sera enviado

Chegando no servidor os dados, o webservice do metodo deve compara com o md5 com o que veio
Se diferente, deve dizer que veio incompleto = erro

Se webservice bateu md5 com o que veio deve retornar = ok

Simples assim....

Se deu erro a multi thread no Windev mobile deve ficar em loop tentando mandar

Olha que legal e simples de fazer

http://help.windev.com/en-US/…

http://help.windev.com/en-US/…

http://help.windev.com/en-US/…

http://help.windev.com/en-US/…

// Calculate the Hash of values for two edit controls
Hash1 is Buffer = HashString(HA_MD5_128, EDT_Edit1)
Hash2 is Buffer = HashString(HA_MD5_128, EDT_Edit2)
// Compare the two Hash
IF Hash1 = Hash2 THEN Info("The two strings are identical.")


// Calculate the Hash of two files
Hash1 is Buffer = HashFile(HA_MD5_128, "C:\My files\FileA.txt")
Hash2 is Buffer = HashFile(HA_MD5_128, "D:\My files\FileB.txt")
// Compare the two Hash
IF Hash1 = Hash2 THEN Info("The two files are identical.")


// Check the password:
// - Password typed in the "EDT_TypePassword" control
// - The password Hash is found in the "User.HashPassword" item
IF HashCheckString(HA_MD5_128, EDT_TypePassword, ...
User.HashPassword) = True THEN
Info("Password OK.")
// Rest of process
// ...
ELSE
Error("Wrong password.")
// Resume the input
ReturnToCapture(EDT_TypePassword)
END


// Calculate the Hash of the "C:\Temp\File.txt" file
HashMyFile is string
HashMyFile = HashFile(HA_MD5_128, "C:\Temp\File.txt")

// Process on the file
// ...

// Checks whether the file was modified
IF HashCheckFile(HA_MD5_128, "C:\Temp\File.txt", ...
HashMyFile) = False THEN
Info("The file was modified.")
END


Bons estudos

:merci:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modified, October, 31 2016 - 10:25 PM