I am able to resolve this issue with a fix on JSP page. Flex
HTTPService and ActionScript both solutions works just fine and sends
all the data without truncation. I was able to view the entire XML
data using Wireshark Network Protocol Analyzer. Below is the code I
fixed on the JSP page.
Sorry my bad, for some reason the Servlet's BufferedReader was not
reading more than 8K of data. I will investigate further on that.
-satish
PrintWriter outcsXML = new PrintWriter(new FileOutputStream(new File(
"c:\\temp\\example.xml")));
ServletInputStream br = request.getInputStream();
int line = 0;
while ((line = br.read()) != -1) {
outcsXML.print((char)line);
}
br.close();
outcsXML.flush();
outcsXML.close();
--- In [email protected], "satish_cattamanchi"
<[EMAIL PROTECTED]> wrote:
>
> Hi everyone,
>
> I am using HTTPService POST method to send around 40K of data to
> JSP , but the JSP is receiving only 8K of data on the server side. Any
> ideas what I might be missing. Any ideas is much appreciated.
>
> Thanks,
>
> Here's the code snippet of MXML and also ActionScript.
>
> <mx:HTTPService id="deployCSAppXML" url="deploy.jsp" method="POST"
> contentType="application/xml"
> result="ProcResult(event)" showBusyCursor="true"
> useProxy="false" /
>
> I also tried Action Script:
>
> var request:URLRequest = new URLRequest("deploy.jsp");
>
> request.data = dataXML.toXMLString();
> request.contentType = "text/xml";
> request.method = URLRequestMethod.POST;
>
> var loader:URLLoader = new URLLoader();
> loader.addEventListener(Event.COMPLETE, ProcResult);
> loader.load(request);
>
> Here's the JSP code on the Server Side:
>
> PrintWriter outcsXML = new PrintWriter(new FileOutputStream(new File(
> "c:\\temp\\example.xml")));
> BufferedReader br = request.getReader();
> String line = null;
>
> while ((line = br.readLine()) != null) {
> outcsXML.print(line);
> }
> br.close();
> outcsXML.flush();
> outcsXML.close();
>