View Full Version : HTTPService and .NET web service

06-24-2008, 12:31 AM
I have a .NET web service which allows me to do either SOAP or an HTTP POST. I can't use the SOAP service (don't ask, it's an order from on high) so I need to get my Flex project set up to connect properly.

.NET Service:

POST /UserService.asmx/getUserByName HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: length


I can't find a way to specify the "/getUserByName" in the POST of the HTTPService:

dataService = new HTTPService();
dataService.url = dataServer + "UserService.asmx";
dataService.method = "GET";
dataService.addEventListener("result", userLoginResult);
dataService.addEventListener("fault", fault_listener);
dataService.contentType = "application/x-www-form-urlencoded|application/xml"
dataService.resultFormat = "xml"

var parameters:Object = new Object();
parameters.username= username;

I've tried forcing it into the URL, but that fails.
I've also attempted to enter it as an Operation parameter, but that didn't work either.
Please HELP!!!

06-24-2008, 08:02 PM
oh... my... GOD!!!!!!!!!!!!!!!!!!!!

Using this: dataService.contentType is what was killing my service call. Just removing it made everything work. That is pathetic considering that I basically regurgitated examples from Adobe. Flex/ActionScript is sucking more and more all the time...

04-07-2009, 10:37 AM
So how did you solved this one?

"I can't find a way to specify the "/getUserByName" in the POST of the HTTPService:"

Same problem!

Valentino Rijhen