LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

6 Problem Using data Socket in LabWindows

Hi,

I wrote Simple Application to communicate with web application using
DataSocket, when Getting Response from the Web page first character is
dulicating 3 more times and overlapiing the rest of the String,
e.g.

When Sending request to URL : I Should get the Data " ERROR -
flex_user_code is missing." back insted i am getting "EEEER -
flex_user_code is missing."

the code i am using is

DS_Open (URL, DSConst_ReadAutoUpdate, DSCallback, NULL, &dsHandle);

and in Callback function

DS_GetDataType (dsHandle, NULL, &size, NULL);
buffer = malloc (size + 1);
DS_GetDataValue (dsHandle, CAVT_CSTRING, buffer, size + 1, 0, 0);

did any one know wht the problem can be ?

0 Kudos
Message 1 of 4
(3,403 Views)
Hi Anonymous,

The code you posted looks correct (it appears to have been copied from the help section on DS_GetDataValue).
It is odd that the message contains the same number of characters in the beginning, but most have been replaced with 'E'. Is there a way you can verify with another program that this is indeed the message being sent? Also, is this a public URL that I could connect to and test it myself? If you can change the message, what string do you read if you replace it with "Hello World."

Regards,
0 Kudos
Message 2 of 4
(3,371 Views)
Hi,


The URL Is not public, it's QMS system on private server that i am
communicate with, when sending "Hello World" i am getting "HHHHo
World".

Doing the Same with labView ( Using dataSocket ) bring the same
results ( same Problem ), so i don't think that the code is the
Problem, may be same DLL. both application using.

But when using Microsoft IE6 i am getting back the string i am looking
for ( e.g Hello World ).

Thanks

Shimon Kringel
Actelis Networks.


On Jan 27, 12:10 am, James M <x...@no.email> wrote:
> Hi Anonymous,The code you posted looks correct (it appears to have been copied from the help section on
> DS_GetDataValue).It is odd that the message contains the same number of characters in the beginning, but most have been replaced with 'E'. Is there a way you can verify with another program that this is indeed the message being sent? Also, is this a public URL that I could connect to and test it myself? If you can change the message, what string do you read if you replace it with "Hello World."Regards,

0 Kudos
Message 3 of 4
(3,365 Views)
Hi Shimon,

I wrote a simple datasocket program in LabVIEW and connected to http://ni.com. The first line in the string I read was:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

I verified that this is correct using "View Source" in Internet Explorer. If you point your program to
http://ni.com, what do you see?
If you are reading the correct value, I'm afraid there may be something wrong with the QMS system. What versions of CVI/LabVIEW are you using?

Regards,
0 Kudos
Message 4 of 4
(3,328 Views)