This is trivial with a normal mx:Object.  Are you committed to sending a
custom object?

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of pbrendanc
Sent: Wednesday, July 16, 2008 5:44 PM
To: [email protected]
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

 

Reply via email to