11 Replies Latest reply on Nov 6, 2011 6:43 AM by yancaoshi

    flex blazeds ios problem

    Daniel Bogn.



      I've created a small test app (Burrito Mobile Application / Flex Hero SDK) that connects to a remote Blazeds server (Tomcat, Port 8400). The application does 2 simple tasks: it 1. connects as a Consumer to the amf streaming destination and 2. calls a proxy service, both handled by Blazeds. Works in Desktop-Air and Browser-Flash. However, when I create an .ipa file all parts of the app are handled correctly (e.g. HTTPService parsing xml), except the Blazeds functionality. No error message and no data is displayed. Tried to switch the ports on the Tomcat to 8080, again same result, all working except IOS. It is strange that Consumer's subscribe() method works and is true but then happens nothing.


      Does anybody have an idea?



        • 1. Re: flex blazeds ios problem
          Daniel Bogn. Level 1

          Can anybody confirm that blazeds works on ios / android at least?

          • 2. Re: flex blazeds ios problem
            mark dong Level 1

            I got the same problem and using LCDS.  I'm using remoteObject with AMFChannel and HTTPChannel. I guess it is caused by AMF serialization.

            • 3. Re: flex blazeds ios problem
              Daniel Bogn. Level 1

              It also does not work with WebORB, so it is not a BlazeDS/LCDS/WebORB fault.


              I find this is a critical issue, especially in the current situation when Adobe is praising the portability to mobile devices - i still cannot believe that streaming / remoting does not work on mobile devices or that nobody has an idea about it.

              • 4. Re: flex blazeds ios problem
                mark dong Level 1

                I just found the problem is not caused by BlazeDS/LCDS. It works if you call remoteObject using pure AS3 or MXML directly. My problem is caused by other reason.

                • 5. Re: flex blazeds ios problem
                  mark dong Level 1

                  I think problem is not caused by any remoting/streaming code because it works in my environment (Using remoteObject + LCDS with 7001 port).   Maybe you can check some codes which handle server's response . 

                  • 6. Re: flex blazeds ios problem
                    yancaoshi Level 1

                    Have you ever tried blazeDS on iPad? My case works fine on android but not on iPad.


                    I got below error message from Faultevent:

                    Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: ''


                    Nothing happens on server side because nothing is logged though I switched on all levels.



                    • 7. Re: flex blazeds ios problem
                      alinator11 Level 2

                      I have no problems with Blaze and Android or iOS.  I use MXML to declare and AS3 for everything else:



                      <s:ChannelSet id="channelSet">

                      <s:AMFChannel id="amfChannel" url="{getChannelDestination()}"/>










                      When I tried to do the above with AS alone, it never worked. But, could have had some other problem. Nonetheless, I use MXML as above and then do everything else in AS such as:


                      public function aBlazeFunction(anObject:MyObject, userID:String) {

                      this.anObject =anObject

                      this.functionCalled = "afunction";




                      My result handler looks like:


                      private function resultHandler(event:ResultEvent):void {

                                      if(functionCalled == "afunction") {

                                          functionCalled = "";





                      • 8. Re: flex blazeds ios problem
                        yancaoshi Level 1

                        Thanks for your attention but I am not able to get it work. WOuld you please so kind to check my sample coding? My blazeDS works and destination bp provides a method getSystemTime which simply returns server time.

                        It returns NetConnection.Call.Failed on iPad though I am assure it works fine on android.






                        <?xml version="1.0" encoding="utf-8"?>
                        <components:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                             creationComplete="view1_creationCompleteHandler(event)" title="HomeView">
                           import mx.events.FlexEvent;
                           import mx.messaging.ChannelSet;
                           import mx.messaging.channels.AMFChannel;
                           import mx.rpc.events.FaultEvent;
                           import mx.rpc.events.ResultEvent;
                           protected function view1_creationCompleteHandler(event:FlexEvent):void
                           protected function serviceObject_faultHandler(event:FaultEvent):void
                            testResult.text += event.toString();
                           protected function serviceObject_resultHandler(event:ResultEvent):void
                            testResult.text += event.result.toString();
                          <!-- Place non-visual elements (e.g., services, value objects) here -->
                           <s:ChannelSet id="channelSet"> 
                            <s:AMFChannel id="amfChannel"
                           <s:RemoteObject id="serviceObject" channelSet="{channelSet}" destination="bp"
                         <s:TextArea id="testResult" width="366" height="434">
                        • 9. Re: flex blazeds ios problem
                          alinator11 Level 2

                          Hey yancaoshi. Sorry I missed this. Were you able to get it to work? I think I saw another thread on this and perhaps it was answered for you? In that thread it was suggested to update your url to the actual remote server instead of the interal address. I can attest to that having been a problem for me at one point in the past as well.

                          • 10. Re: flex blazeds ios problem
                            yancaoshi Level 1

                            My apology for having not update the thread ASAP.

                            I found out the root cause last Friday actually and that is win7 firewall. Still not know which setting blocks the request out.

                            I used win7 32bit version at home which installs tomcat and doesn't get request from iPad until I close the firewall. And the same application works in my office PC which has win7 64bit and tomcat installed no matter firewall is on or off.


                            Anyway, it proves that iPad can interact with blazeDS fine.


                            Thanks and regards,

                            • 11. Re: flex blazeds ios problem
                              yancaoshi Level 1

                              Another point. Before I close firewall to make it run, I set the channel manually in the class generated by data service. Otherwise, it doesn't work either.



                                   protected override function preInitializeService():void
                                      // Initialization customization goes here
                                      // Here I set the channelSet manually because I find it's null when debugging
                                      channelSet = new ChannelSet();
                                      var amfChannel:AMFChannel = null;  
                                      amfChannel = new AMFChannel("my-amf", "");
                                      amfChannel.pollingEnabled = false;