Hi,

I'm trying to send a nested array object using the method below but I 
still seem to be getting an HTTP request error and I'm not sure why.

Any help would be greatly appreciated.

public function useHttpService(batchContainer:Object):void {
           var container:String = JSON.encode(batchContainer);
           var test:Object = new Object();
           test.data = container;
           service = new HTTPService();
           service.url 
= "http://172.19.60.128:8080/ViewDuration:registerBatchEvent/";;
           logger.info("service.url: "+ service.url);
           service.method = "POST";
           service.useProxy = false;
           service.resultFormat = "text";
           service.addEventListener("result", httpResult);
           service.addEventListener("fault", httpFault);
           logger.info("batchContainer final: "+ batchContainer);
           logger.info("batchContainer encoded: "+ container);
           service.send(test); 
        }

Claud

--- In flexcoders@yahoogroups.com, "michael.ritchie" 
<[EMAIL PROTECTED]> wrote:
>
> Tracy, 
> 
> Your last suggestion did the trick.  I was able to send my large
> string using by sending the data in the body, not the url.  For the
> list, here is the fix to my problem.
> 
> Tracy writes:
>  
> I believe that when the message body is empty, Flex always uses 
GET. 
> And when you put your data on the url, you are using the querystring
> and not the body.
> 
> Instead. use the naked url, and in AS, do:
> 
> var oRequest:Object = new Object();
> 
> oRequest.data = { ...large JSON data sring ...}
> 
> JSONSaveCollection.send(oRequest);  // call to the HTTPService
> 
> -------
> 
> Thanks again Tracy... :D
> 
> Michael
> 
> --- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspratt@> wrote:
> >
> > Change the method to "POST".  GET has a limit, but I have used 
POST for
> > quite large data streams.
> > 
> >  
> > 
> > Tracy
> > 
> >  
> > 
> > ________________________________
> > 
> > From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> > Behalf Of michael.ritchie
> > Sent: Thursday, January 25, 2007 3:39 PM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] HTTP Request Error and long strings
> > 
> >  
> > 
> > 
> > There seems to be a size limit the value you set on the url 
propery
> > for a Flex HTTPService call, around 12000 characters (12KB?). 
Could
> > there be maxrequestlength setting in a config file for Flex 2 some
> > place that we can adjust the limit?
> > 
> > When we send a JSON string on with the HTTP service that is over 
12000
> > characters we receive the following error message:
> > 
> > Error: [RPC Fault faultString="HTTP request error"
> > faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent
> > type="ioError" bubbles=false cancelable=false eventPhase=2 
text="Error
> > #2032: Stream Error. URL: [...12716 character string...]
> > 
> > We tested this on both IE 7 and Firefox. I don't think this is a
> > browser post limit as we have other non-Flex applications that 
post
> > that many characters. 
> > 
> > Michael Ritchie
> > AOL Xdrive
> >
>


Reply via email to