Blazeds and Flex Mobile

Hey guy! I need help on a project i'm working on. I just got into Blazeds Remoting for a Flex application because i wanted to use the publish/subscribe model. Coming from a java background this is no problem for me. I've got a Producer component which happens to be in a mobile application and a consumer component which resides on the webser. The Mobile app is meant to publish a mobile phone's GPS details as an object to a server using blazeds messaging capabilities in which a consumer application reads this data and uses it to display the device's location on google maps. The Consumer side seems to be working fine but anytime the producer sends a message i get fault error like so:
Channel.Connect.Failed error Net Connection.Failed :HTTP Status 503:URL: http://cmeunit.swf.<webappname>/messagebroker/amfpolling
Notice the incomplete hostname which is supposed to be acmeunit.swf. I dont know what i'm doing wrong, is there anyway around this.
Any form of help will be appreciated! thanks!

Hi l33tian, I'm running into the same problem. Did you find the solution to this? Any help would be appreciated.
Thank you!    

Similar Messages

  • How to display html content with image in Adobe Flash and Flex mobile project?

    Hi,
      I have a html content with image in it. How to display it in Adobe Flash Builder and Flex mobile project? Which control needs to be used for this?

    Hello,
    The only current way is to use an iFrame, or if you only need some html tags you could use the Text Layout Framework.
    Here this is the iFrame approach:
    http://code.google.com/p/flex-iframe/
    If the swc do not work in Flex4 just use its ource code which works...
    ...it is basically based on this:
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm
    see also and vote, please:
    http://bugs.adobe.com/jira/browse/SDK-12291
    http://bugs.adobe.com/jira/browse/SDK-13740
    Regards
    Marc

  • BlazeDS and Flex Client Deployed on Different Servers

    Hi, I setup a BlazeDS AMF endpoint on a different server from the server where my Flex app is deployed. I get the following error from my Flex app when trying to use this endpoint:
       faultCode: Client.Error.MessageSend
       faultDetail: Channel.Security.Error error Error #2048 url: 'http://cafrfd1y5css50.itsdo.abc.com:7000/sfaflexservice/amf'
       faultString: Send failed
       rootCause:
           [ChannelFaultEvent
            faultCode="Channel.Security.Error"
            faultString="error"
            faultDetail="Error #2048 url: 'http://cafrfd1y5css50.itsdo.abc.com:7000/sfaflexservice/amf'"
            channelId="my-amf"
            type="channelFault"
            bubbles=false
            cancelable=false
            eventPhase=2]
    Btw, this setup works fine when my Flex app runs on AIR or as a Flex app (in a browser) from Flex Builder.
    This looks like a crossdomain policy issue, so I setup a crossdomain.xml file on the BlazeDS server. When I point my browser to http://cafrfd1y5css50.itsdo.abc.com:7000/crossdomain.xml, I see the following:
        <?xml version="1.0" encoding="UTF-8" ?>
        <cross-domain-policy>
           <allow-access-from domain="*.abc.com" />
        </cross-domain-policy>
    Looks good, but I get the same error...
    So I monitored the interaction with Fiddler to see if the crossdomain.xml file is loaded. It is. When the service is activated, I see the following GET command in Fiddler:
         GET /crossdomain.xml HTTP/1.1
         Host: cafrfd1y5css50.itsdo.abc.com:7000
    And the response contains the contents of the crossdomain.xml file, so I don't know what's going on.
    My configuration is:
    -- Browser: IE7 or FireFox v3.5 with Flash Player v10.
    -- Flex app uses the 3.4 SDK and is deployed on a Tomcat v6 server.
    -- BlazeDS server is WebLogic v9.
    -- Endpoint definition from services-config.xml on the BlazeDS server is:
       <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
         <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
       </channel-definition>
    -- Endpoint in the Flex app is defined as follows:
       <channel alias="FlexBean">
          <channel_def>my-amf</channel_def>
          <endpoint>http://cafrfd1y5css50.itsdo.abc.com:7000/sfaflexservice/amf</endpoint>
          <destination>FlexService</destination>
       </channel>
    Any ideas would be much appreciated...
    thanks,
    matt

    Thanks for the reply, Alex.
    I tried setting the domain in the crossdomain policy file to "*", but I got the same error, so I turned on client side logging. The error in the log was:
    Error: [strict] Ignoring policy file at http://cafrfd1y5css50.itsdo.abc.com:7000/crossdomain.xml due to missing Content-Type.
    See http://www.adobe.com/go/strict_policy_files to fix this problem.
    Using Fiddler, I checked the content-type that WebLogic was using for crossdomain.xml. Much to my surprise, there wasn't a content-type in the response, only content-length. So in the web.xml file for this application, I added the following:
    <mime-mapping>
        <extension>xml</extension>
        <mime-type>text/xml</mime-type>
    </mime-mapping>
    Now, the crossdomain.xml file is served with a content-type of "text/xml", and the call to the BlazeDS endpoint works.
    Thanks for steering me in the right direction, Alex.
    cheers!
    matt

  • Flash Builder 4 and Flex Mobile

    I've started a Udemy course on Building Mobile Projects in Flash, and late last year I bought CS5 Master Suite with Flash Builder 4. Now I'm halfway through the course and was instructed to open a "New Mobile Project" in Flex, and didn't have this option.
    After a bit of research it became clear I need Flash Builder 4.6. The course didn't specify this, which is extremely annoying, seeing as I've coughed up a not insubstantial amount of money for the software. Can anyone tell me what my options are here? I'm reluctant to part with more cash just to upgrade to yet another version of Flash Builder.

    Hi,
    You can still build apps with the AIR sdk using the command-line. One thing you lose by not upgrading to FB 4.6 is the new mobile framework in Flex, along with easier build/debug options. In my opinion it really is beneficial to upgrade. You will find it much simpler to test your apps and deploy them for iOS, Android, and BlackBerry.
    Again, you can do everything with the free AIR sdk, including the new AIR 3.1 features like captive runtime, etc, it just won't be integrated into Flash Builder 4. Ant scripts are another way to automate the build process, and FB 4 has a streamlined Ant integration.
    iBrent

  • TLF and Flex Mobile

    Has anyone tried using TLF code in a Flex 4.5 Mobile application? Everything compiles and runs fine but the text is invisible. Any known workarounds for this?

    I was trying to run a simple pagination example that works fine as a web app.
    It uses the paginationWidget.as and Alice.as files which can be found here: http://blogs.adobe.com/tlf/files/2010/09/Pagination20Build169.zip
    Any help would be appreciated.
    Thanks
    The code for the Home view is:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark" title="Home">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import tools.PaginationWidget;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.TextLayoutFormat;
    public var pageView:PaginationWidget = new PaginationWidget();
    public var curChapter:int = -1;
    private function init():void {
    storyBox.width=this.width;
    storyBox.addChild(pageView);
    pageView.setSize(storyBox.width, storyBox.height);
    setChapter(0);
    private function setChapter(chapterNumber:int):void
    curChapter = chapterNumber;
    var textFlow:TextFlow = TextConverter.importToFlow(Alice.contents[chapterNumber], TextConverter.TEXT_LAYOUT_FORMAT);
    pageView.textFlow = textFlow;
    private function prevChapter():void
    if (curChapter > 0)
    setChapter(curChapter-1);
    private function nextChapter():void
    if (curChapter >= 0 && curChapter < Alice.contents.length-1)
    setChapter(curChapter+1);
    ]]>
    </fx:Script>
    <s:Group top="0" left="0" right="0">
    <s:Button left="100" top="0" width="70" height="25" label="np"
      click="pageView.nextPage()" fontSize="18"/>
    <s:Button left="0" top="0" width="70" height="25" label="pp"
      click="pageView.prevPage()" fontSize="18"/>
    <s:Button right="0" top="0" width="70" height="25" label="nc" click="nextChapter()" fontSize="18"/>
    <s:Button right="100" top="0" width="70" height="25" label="pc" click="prevChapter()" fontSize="18"/>
    <s:SpriteVisualElement id="storyBox" top="25" bottom="0" left="0" right="0" />
    </s:Group>
    </s:View>

  • BlazeDS and FLEX

    Just a very simple question to ask, I'm trying to create a search function. But I have totally no idea that how can i get the parameter from FLEX to the .js in my blazeds service.
    Example: from the project.mxml, textbox1.text data to my javascript.
    Can somebody enlighten me

    Can somebody help me regarding this? Thanks

  • Best practices for "designer - developer" interaction in Flex Mobile

    Hi,
    I'm starting development of a mobile software application and Flex Mobile is the platform I've chosen for that.
    What is the best practice / recommended workflow for designer-developer interaction? For example in web application the designer provides HTML/CSS templates to the developer which integrates them in the Web Application. What is the analogue in Flex Mobile? What should I request as input from the designer?
    I'll appreciate any hints, links, advises or previous experience on the topic.
    Thanks!
    Best Regards,
    Dinko

    If you're using Adaptive Web Design (CSS3 media queries), you can maintain one site with CSS Layouts optimized for different device widths.
    http://www.adobe.com/devnet/dreamweaver/articles/introducing-media-queries.html
    jQuery Mobile
    http://jquerymobile.com/
    If you're actually running separate web sites for mobile and non-mobile devices, have a look at this recent discussion:
    http://forums.adobe.com/message/4177360#4177360
    IMO, there is nothing wrong with providing links for mobile and non-mobile users to choose which site they would prefer to use -- especially for tablets who may have an interest in both.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Is Galaxy Y useful for Flex mobile?

    Hi All,
    I am very new to flex and flex mobile i am trying to develop small small application for practice and to explore more into flex and flex mobile.
    I have galaxy y having android 2.6 gingerbird. i developeded one flashmobile application but when i am trying to sync with this mobile it not happening. Even i cant install Adobe Air from market. Can you guide me whether it is possible to test my work with this Galaxy Y or i have to purchase an high-end mobile only to test my works.
    kindly suggest how i can test my works with this mobile.
    Thanking you
    Girish Mohapatra

    Hi, Girish -
    You can install AIR 2.6 or a higher version only on supported Android devices that run Android 2.2 or a higher version. For the list of supported Android devices, see Certified Devices. Also, review the minimum system requirements to run Adobe AIR on Android devices at Mobile System Requirements.
    Hope this helps,
    Mallika Yelandur
    Community Help & Learning
    Adobe Systems Incorporated

  • Flex mobile project: web root and root path for a remote web service?

    Hi all,
    i'm trying to set up the testdrive tutorial for flex mobile project, with flash builder 4.5
    and php data.
    I've uploaded the files on my remote web space (e.g. http://mywebsite.org, and the
    test file is http://mywebsite.org/TestDrive/test/test.php... and it works
    correctly)... But when i'm setting properties of the project, i don't know what
    to write into the web root and root path fields... I thing root path is simply
    http://mywebsite.org... and whatever i write in the other fields (output folder
    too) i have errors when i click on "validate configuration"...
    What should i put into those fields? is zend framework (and gateway.php)
    strictly necessary?
    As you can see... i'm a bit confused....
    Many thanks for any help
    Bye
    Alex

    I thought it was a simple question...
    No advice?

  • Getting started with Flex Builder, BlazeDS and Eclipse

    Hi,
    I'm a java developer looking at RIA for the first time. I'm really excited about BlazeDS and object remoting, but I can't get a working dev environment together. I'm assuming I should use Flex Builder for the client code, Eclipse Europa for the java webapp code, and deploy from both IDEs into the BlazeDS-equipped turnkey-Tomcat. I haven't found a tutorial explaining how to deploy a new webapp with this setup.
    The turnkey-Tomcat sample app works fine. Trouble starts when I try to create  a new project in Flex Builder. I don't understand the 'debug' deployment that Flex Builder does. Why are there 2 versions of my app, the regular and the debug versions? What is exactly the project structure that I'm supposed to have in Tomcat?
    The specific error I encounter when trying to deploy a new Flex project is this:
    [MessagingError message='Destination 'productService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']
    I do have a default channel configured for my environment in services-config:
    And I do have a valid destination configured in remoting-config (I'm mostly interested in object remoting):
                test.ProductService
    Here's the client code:
    What am I doing wrong? Where can I get help on these specific topics? Also, does anyone have an Ant build file that would automate this sort of deployment?
    Thanks!

    Hi Peter,<br />I don't have problems passing JavaBeans to Flex. For collections, I used DataGrid, it displayed my collection seamlessly, except I don't get column headers, just a column index number. For receiving a single JavaBean, I had a little more trouble, until I tried to display it with a DataGrid: it displayed a single row that represented my data, with each java property name used as a column header, and object attributes were displayed as 'object'. These 2 experiences led me to these conclusions:<br />- for the collection, Flex converted each element into an ordered list of attributes<br />- for the single bean, Flex converted it into a hierarchy of Maps of attributes<br /><br />I didn't create a Flex value object. Flex is doing it automatically,very much like in JavaScript/JSON: dynamic objects.<br /><br />Here's the remote object markup:<br /><br /><!-- We target the remote Java object through BlazeDS gateway: --><br />     <mx:RemoteObject id="myRemoteObject" destination="productService" <br />                          fault="Alert.show(event.fault.faultString, 'Error');"><br />          <mx:method name="getProductsCount" result="setProductsCount(event)"><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProducts"><br />          <!-- search params are wrapped in a model, ProductSC (will be converted to a Map on <br />                the server side by BlazeDS): --><br />               <mx:arguments><br />                    <arg1>{productSC}</arg1><br />                    <!-- This works because we declared these to be Bindable: --><br />                    <arg2>{pager.pageSize}</arg2><br />                    <arg3>{pager.currentPage}</arg3><br />               </mx:arguments><br />          </mx:method><br />          <mx:method name="getProduct" result="goToView()"><br />          <!--<mx:method name="getProduct">--><br />               <mx:arguments><br />                    <arg1>{selectedRecordId}</arg1><br />               </mx:arguments><br />          </mx:method><br />     </mx:RemoteObject><br /><br />And here's the dataGrid that displays the bean collection:<br /><br /><mx:DataGrid id="myDataGrid" <br />                               dataProvider="{myRemoteObject.getProducts.lastResult}" <br />                               change="selectRecord();"<br />                               width="100%" height="100%" ><br />               </mx:DataGrid><br /><br />Let me know how it goes, I'd be glad to assist if I can.<br />Miguel

  • Flex Mobile 4.5.1: Package contents and URLLoader

    On Flash for web and desktop (Projector debugger), one can use a URLLoader to load local URLs (eg files off your hard drive).  This is very useful for some development purposes, as you just need to make sure any external files (JSON & PNG) are in the same relative path as the SWF, and you then don't need to worry about different code paths whether you're loading these external files from local storage or http.  URLLoader operates the same whether loading locally or remotely.
    Is there any way to easily get the same behavior on a Flex Mobile 4.5.1 app (specifically for an iOS target)?  Again, this is useful because in my live app, these external files will be loaded from our web server, but for testing purposes I would like to be able to run in a server-less mode and include them with the deployed debug IPA file.  My first problem is that I cannot seem to figure out how to deploy these files to the application in the first place - I tried adding my external-files folder to the Flex Build Path as an additional Source folder, but they still don't show up under the Package Contents for iOS tab.
    Any ideas?  Are there any include-extra-files-in-package options in the -app.xml? 
    Or is there no way to use URLLoader for local storage on mobile, and I am stuck with using Embed?  (I guess besides Embed I could manually deploy the files to the iOS file system and use the AIR api for access, but that's still a different code path, defeating my goal - we have a decent bit of code built around the idea that URLLoader is agnostic)

    Edit: Realized my original answer wasn't correct, the files were being pulled in from another setting.
    After some experimenting, the answer is YES, and it's actually a bit unexpected: Just in fact adding the external files folder to the Flex Build path | Source Path actually pulls them all in.  It seems those directories are passed to both mxmlc and adt.  Unexpected surprise.

  • IOS universal support and ASC 2.0. Will it impact Flex Mobile projects?

    Hello,
    Regarding the latest release notes for AIR 16, it says
    "The legacy compiler is not (and will not be) compatible with iOS 64-bit.[...] it will be removed with version 16 of the AIR SDK"
    I am a bit lost with what it means for Flex Mobile (4.6 or Apache Flex SDK). Will we still be able to compile once AIR 16 is out or will this new compiler have issue with Flex projects compiled for iOS? Will it need us to make some changes on existing Flex applications?
    Thanks for your clarifications,
    Fabien

    It seems this wrong rumour is spreading around... a lot of people don't bother researching properly.
    When they talk about the legacy compiler they talk about ADT, MXMLC will continue to work. The simplified IPA packaging process is: Source code --- MXMLC/ASC2---> SWF ---ADT AOT Compiler---> IPA
    So with AIR 16 the ADT -useLegacyAOT argument will be removed.

  • Flex mobile orientation: force portrait mode and then allow auto orientation

    I'm creating a flex mobile project and I want to force the app to portrait orientation when I click a button, and when I click other button allow again to change the orientation.
    This is my code when I click the first button, where I want to force portrait mode:
    protected function click(event:MouseEvent):void{      if(stage.orientation != StageOrientation.DEFAULT){           stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged);           stage.setOrientation(StageOrientation.DEFAULT);      }else{           doSomething();      }  }  
    private function orientationChanged(event:StageOrientationEvent):void{      doSomething();      stage.removeEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged); } 
    private function doSomething():void{      stage.autoOrients = false; }
    It works ok and it changes the orientation if it's needed.
    Now, when I want to allow orientation change again, I've only putted:
    stage.autoOrients = true;
    It works ok if when I click the first button the app is in portrait and it doesn't have to change anything. But if it's on landscape and it have to change to portrait, when I allow orientation change again, it doesn't work ok.
    Do you know if I have to allow or change something? Or, is there any better way to do this?
    Thanks in advance

    Thanks for your answer. It works, but I have the same problem that I have setting the orientation. If I'm on landscape, it changes to Portrait ok, but when I want to allow auto orientation again, it doesn't work well.
    A little tricky I've found is:
    When I want to force to portrait:
    private var oldOrientation:String = null;
    protected function click(event:MouseEvent):void{
       if(stage.orientation != StageOrientation.DEFAULT){
                oldOrientation = stage.orientation;
                stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGE, orientationChanged);
                stage.setOrientation(StageOrientation.DEFAULT);
       }else{
                doSomething();
    private function orientationChanged(event:StageOrientationEvent):void{
                // do something if you are changing to portrait mode (the first change) and other thing if you are changing to old orientation
    And when I want to allow auto orientation again:
    if(oldOrientation != null){
            stage.setOrientation(oldOrientation);
            oldOrientation = null;             

  • Flex Mobile, URLLoader and Sessions

    I have created a Flex Mobile Project that I've been testing so far on a Motorola Xoom and uses the URLLoader object to query some JSP pages and return the output. These JSP pages require user authentication which depend on sessions.
    If my URLLoader requests are made sequentially (the second request is not made until the first is completed) session information functions normally. If multiple URLLoader requests are made at the same time there is a chance that one or more of the request's session information will fail. I've used a packet sniffer and found that the "Cookie: JSESSION=..." header value is not being set or sent to the server.
    I've actually been able to solve this problem by fetching my session ID when I login, storing it locally and setting the "Cookie: JSESSION=..." value manually in the header of all my URLLoader requests. Most of the time the browser will overwrite this value that I've set with the session ID that it has, and that's fine. But in the case where it doesn't set this value then my manually set value is passed to the server and it is able to find the appropriate session.
    The solution I've come up with seems to work so far, but I was still wondering if anybody knows what's causing this or knows a better solution?

    That sounds like everything's working the way it should. Until the "first" request is authenticated successfully and the response comes back to the browser/device, your app doesn't have session credentials. Sending multiple simultaneous unauthenticated requests will thus all need to authenticate individually -- and making matters worse, may create multiple sessions on the server, so as they come back your session info (as represented by your JSESSION ids) will rapidly run through all the new sessions until settling on the last one.
    I would suggest changing your application flow to let your first request go by itself first and not submit any other requests until that (authenticated) response is received.
    -- Tom
    Flex SDK engineer

  • Flex mobile and PHP project

    Hi! Recently I've downloaded the Flash Builder for PHP to work with my Zend Server remotely located in OpenShift online. I did not  download and install the Zend Server physically on  my computer. Hence, when creating the Flex mobile and PHP project, I couldn't find my web root address. Now I have an error connecting to the MySQl database in the server from the Flash Builder. Can someone help me with this? I'm new to using these programs.
    I'm following this guide on building mobile apps:
    http://files.zend.com/help/Flash-Builder-for-PHP/Getting-Started/Mobile/build_a_mobile_(ph p)_application.htm#Step_13:_Preview_the_Mobile_Application_Using_the_Desktop_Emulator

    PHP is server side.
    If you want to have a app to function offline you would probably need sqlite and then code actionscript to synch data when the device regains it's connectivity.

Maybe you are looking for