Helpful Information
 
 
Category: Apache Flex
HTTPService and .NET web service

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

username=string


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;
dataService.send(parameters);


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!!!

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...

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!

Regards,
Valentino Rijhen










privacy (GDPR)