I am using flash builder to develop android apps. This is my action script code in to call my webservice which will insert data to my database on clicking the check boxes.
var ResponseValue:int = 1;
var QuestionID:int = data.QuestionID;
ResultsQuestion = new ArrayCollection();
var service:HTTPService = new HTTPService();
service.url = "http://IPaddress:443/InsertData/Service1.asmx/HelloWorld";
//service.url = "http://localhost/InsertData/InsertData/Service1.asmx/HelloWorld";
var parameters:Object = new Object();
This works fine on my local host , but when I try to connect to the service on the server, my fault event shows me #2032 error and Fault string is HTTP Request Error. I am not sure how and where to look. Is there some thing in the server settings. Or do I have send headers? I am using the same server to pull data for me to populate my android app, and I have no issues.
Well I used Webserivce in flex instead of the HTTP Service, since I was working with a .net Webservice. And that worked like a charm.
<s:WebService id="ws" wsdl="http://uraddress:443/TestWebserives/Service1.asmx?WSDL">
And all I had to do in the event where I wanted to send the data to my webservice was to just have something like this
ws.HelloWorld(ResultsQuestion.getItemAt(0).ResultSEQ,ResultsQuestion.getItemAt(1).Question ID,ResultsQuestion.getItemAt(2).ResponsePromptID,ResultsQuestion.getItemAt(3).ResponseValu e);
Where ResultsQuestion is a Array Collection.
But, I am not sure what is the disadvantage/advantage of using Webservice over HTTPSerive?