Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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:

    Code:
    			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!!!
    Last edited by gwfran; 06-24-2008 at 01:20 AM.

  • #2
    New Coder
    Join Date
    Nov 2006
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...

  • #3
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •