开发者

PlayBook app wont make http rpc calls. HTTP request error

I have a simple app written in air using Flash Builder Burrito that makes rpc calls to a webservice. The app works perfectly when it is run in a shockwave window, but it doesn't make the http call on the PlayBook simulator.

responder.token = ph.verifySettings(txtServer.text, Number(txtPort.text), txtUser.text, txtPass.text);

From closer inspection the request is sent but the response is not received. Flash builder isn't showing the request in the Network monitor th开发者_开发问答ough. I can do the Test Operation from Flash Builder and see that it works and I can run it with the launch method set to desktop and it works as expected.

This is the error that I am getting

[FaultEvent fault=[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:37813/ws/verifySettings?hostport=ph.no.de&https=N&id=4F861F44-6267-6379-E80E-0156CED4E259" errorID=2032]. URL: http://ph.no.de/ws/verifySettings"] messageId="5C754C53-64C3-61D9-4580-0156CF05B7E3" type="fault" bubbles=false cancelable=true eventPhase=2]


Apparently you can't use the network monitor with the PlayBook simulator.

var http:HTTPService = new HTTPService();
            http.addEventListener(ResultEvent.RESULT, function (event:ResultEvent):void {
                trace("data " + event.result);
            });
            http.addEventListener(FaultEvent.FAULT, function (event:FaultEvent):void {
                trace("error " + event);
            });

            http.url = "http://google.com";
            http.method = "GET";
            http.resultFormat = "text";

            http.send();

This fails if the Network Monitor is running and works if the Network Monitor is turned off.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜