PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → WD Mobile - Consuming a Web Service from a Pocket PC
WD Mobile - Consuming a Web Service from a Pocket PC
Débuté par Andres Sanchez, 18 juil. 2008 08:56 - 5 réponses
Posté le 18 juillet 2008 - 08:56
Hi everyone.
I am developing an app in a Pocket PC, and having too much trouble.
First I realize that you cannot connect to MSSQL w/o Native Access.
So I began to try to communicate to the server via web services.
Then in the pocket emulator does work with Serialize/Deserialize, but not in the Pocket
It throws an error that a Buffer variable is needed, so I change the string var to buffer, and nothing happend, so i stopped with Serialize / Deserialize and i am sending the data as string with separators. All my options worked in the emulator, but when I try it in the pocket, nothing seems to work.
Anyone has done something like this?
Andres Sanchez
Posté le 18 juillet 2008 - 12:37
Andres,
you have to use UnicodeToAnsi() on the pc side, when connecting from the real device. See the help for more info.
Arie
Posté le 20 juillet 2008 - 11:29
Hi Arie:
Dont know exactly what do you mean by that.
I am not using Unicode Characters.
Please explain more...
Thanks
Andres Sanchez
Posté le 20 juillet 2008 - 11:35
Andres,
1. see help for UnicodeToAnsi
2. Read this: [url=http://www.joelonsoftware.com/articles/Unicode.html][/url]
3. Short explanation: on PocketPC characters are stored in 2 bytes on PC in 1 byte
HTH, Merijn
Posté le 24 juillet 2008 - 09:07
Merjin:
Thanks for the explanation, as you can see this is my first job involving a pocket, and dint know that.
But now I know it and still cannot consume the service as it should, I have tried to put the UnicodetoAnsi function, in several places, on the web service and on the pocket, and sometimes nothing happens, and other the IIS crashes, and have to reset windows.
Can you tell me where do i put exactly that UnicodeToAnsi function.
I have a web service that takes an int number and returns a small data set, I assume this is the string to convert, but the thing is when in the code should i do this in order to get it right.
Thanks for your help
Andres Sanchez
Posté le 28 juillet 2008 - 11:21
Andres,
Currenly I'm using socket communication between pc-Server and PocketPC.
ONLY on PC side:
- UnicodeToAnsi after the SocketRead
- AnsiToUnicode before a SocketWrite