RE: Maximum xml Data Size: RCM4300 DC10-72 [3 Attachments]
"'Mike Moyes' mike-g5W9c/[email protected] [rabbit-semi]" <[email protected]> Sat, 20 Feb 2016 10:25:49 +0200
| Newsgroups | gmane.comp.hardware.rabbit-semiconductor |
|---|---|
| Message-ID | <002301d16bb8$4e95a700$ebc0f500$@com> |
Hi Tom,
I have created an array, filled the array with test data.
This same array is declared in the xml file.
To simplify matters I wrote a skeleton program that only has 2 arrays and 2
associated different xml files.
I did as you suggested by directly accessing the xml files from the browser.
At first I was getting xml file read error messages (see screenshots), then
I discovered if I made the array size smaller then the xml data could read
correctly.
The point at which this happens is when the array size is "578" (correct xml
file read) and "579" (xml file read errors).
So any size above 579 would cause read errors, but the error message also
changed with the array size used.
I then changed this "#define HTTP_MAXBUFFER 4096" from 1024.
After that I could read array sizes up to 2k.
Above 2k the compiler generates error message: " line 869 : ERROR IP.LIB
: Out of variable data space. Please refer to the Dynamic C User's Manual
for more information."
I am currently trying put the arrays into "far" memory: far char
logdata1[lenArray]={0};
Is there more that I have specify to move the arrays to far mem?
Because the problem now is with xml data again, I'm getting "garbage" if I
do a direct xml file read.
Are there specific requirements when using far data in the xml file?
Thanks,
Mike
From: [email protected] [mailto:[email protected]]
Sent: Friday, February 19, 2016 8:10 PM
To: [email protected]
Subject: Re: [rabbit-semi] Maximum xml Data Size: RCM4300 DC10-72
Mike,
What are you using to provide the "my_data1.xml" content from the Rabbit?
You should be able to test with a direct request first to make sure the
Rabbit can send the 30K XML file. What happens if you request
"my_data1.xml" in the address bar of your browser? Does the entire file
come through? Troubleshoot that first, and then work on the
XMLHttpRequest() Javascript call.
If you're using the cgi interface from HTTP.LIB, I believe you send
individual chunks of the content, and use a specific return code indicating
that there's more data to send. If you share your Rabbit code, we should be
able to help you with the necessary changes.
-Tom
On Feb 19, 2016, at 3:10 AM, [email protected] [rabbit-semi] wrote:
Good day,
I would like to know what the size limitation for sending xml data is?
I'm using XMLHttpRequest() to request the xml file.
I have been through the documentation and can't seem to find any (MACROS)
settings for this?
I can successfully send a small number of characters in xml.
But when I examine the packet sent (using Fiddler) from the RCM4300 I find
that the data in the xml file is truncated if I go above 256bytes.
I'm using the RCM4300 in a web server application.
Ideally I would like to send up to 30kbytes at a time. This is being used in
a data logging application.
Below is the webpage code that requests the xml file:
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
myFunction(xmlhttp);
}
};
xmlhttp.open("GET", "my_data1.xml", true); // true=
asynchronous.
xmlhttp.setRequestHeader("Content-Type", "text/xml");
xmlhttp.send(null);
Thanks in advance.
Mike
_____
Posted by: [email protected]