Since I'm not binding the data to any visible fields i want to handle this in as - so I'd like to understand what does/doesn't work using as - I like to use code behind as much as possible.
BTW - I did resolve my 405 error as an IIS issue - however I'm not seeing the data defined in my parameter object in the http request (on the server side). (I'll post a separate message on this) Patrick --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > This is trivial with a normal mx:Object. Are you committed to sending a > custom object? > > > > Tracy > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of pbrendanc > Sent: Wednesday, July 16, 2008 5:44 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] HTTP Service Send Requests with Parameter Object - > 405 Errors? > > > > The Flex docs specify that the send object can contain either Name/Value > pairs of an XML object but I keep getting errors. > Is it possible to pass a (non null) parameter object in the HTTP service > send request - I keep getting HTTP405 (Method not allowed) errors. (If > I include these args as part of the query string everything works as > expected). > > (BTW - I'm using IIS - so is it possible that I need to change some IIS > settings?) > > // Define test object > > public class dummyobj > { > public var f1:String; > public var f2:String; > } > > public function useHttpService(parameters:Object):void { > > var httpSvc = new HTTPService(); > httpSvc.url= "http://localhost:8080 <http://localhost:8080> "; > httpSvc.method = "POST"; > httpSvc.contentType = "application/x-www-form-urlencoded"; > httpSvc.addEventListener("result", httpResult); > httpSvc.addEventListener("fault", httpFault); > > // Load request parameters into an object > // to send with the request > var testVO:dummyobj = new dummyobj(); > testVO.f1 = "aaa"; > testVO.f2 = "bbb"; > httpSvc.send(testVO); // gets 405 > error > > TIA, > Patrick >