Macromedia Flex app talking to Portal

Hi All,
I need my Macromedia Flex app to communicate with my Portal. I was wondering what is the best way to achieve this:
1. Calling a JSP and sending some XML containing the data, or
2. Developing a Portal Service then exposing it as a Web Service.
Also, with the Portal service how do i get hold of the request object?
Thanks in advance,
Raj

1. in my opinion option 1 would be better and you can easily massage the data and send it as the way you want it.
2. other option would be use Flex-Ajax Bridge. where you can create flex controls at runtime from javascript.
<a href="http://labs.adobe.com/wiki/index.php/Flex-Ajax_Bridge">Flex-Ajax Bridge</a>
look about for my weblog on FA bridge with BSP in couple of days time.
Regards
Raja

Similar Messages

  • Flex App talking to remote LCDS (or blaze or granite) server?

    I've got a Flex app that's running just fine sitting on a Tomcat server, talking to GraniteDS (open source LCDS alternative) that feeds it JMS messages.
    However we're going to need to install the Flex SWF app onto another server entirely (maybe JBoss, who knows) because the SWF actually is just part of the overall web application functionality.
    So is it possible to have the compiled SWF sitting somewhere else other than the LCDS/Granite server?  As I said, when the SWF and the DS server are one and the same, it works fine.  But when I separate the two the SWF app can no longer connect to the DS server (addEventListener returns a Fault).
    There must be some configuration file that the SWF can read at run-time to know what DS server URL to use.  Any ideas?

    One more tidbit.  I modified my services-config.xml and replaced the channel dynamic definition URL that was there (http://{server.name}:{server.port}/{context.root}/gravity/amf) with a hard-coded one http://localhost:8080/gravity/gravity/amf/
    Then I modified my Flex app to no longer try to set the Channel at run time, just to use what's in services-config.xml.  Guess what, it connects just fine.  So the url http://localhost:8080/gravity/gravity/amf/ is absolutely correct - the problem MUST be in the Flex code.  The handler for "MessageFaultEvent.FAULT" keeps firing with the fault from my previous post.
    What about this Flex code is wrong?
    myChannelSet = new ChannelSet();
    myChannel = new AMFChannel("my-gravityamf", "http://localhost:8080/gravity/gravity/amf/");
    myChannelSet.addChannel( myChannel );
    // Define Producer
    producer = new org.granite.gravity.Producer();
    producer.addEventListener(MessageFaultEvent.FAULT, faultHandler);
    producer.addEventListener(MessageEvent.RESULT, faultHandler);
    producer.destination = "messages-destination";
    producer.channelSet = myChannelSet;
    // Define Consumer
    consumer = new org.granite.gravity.Consumer();
    consumer.addEventListener(MessageAckEvent.ACKNOWLEDGE, acknowledgeHandler);
    consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
    consumer.destination = "events-destination";
    consumer.subscribe();
    producer.send("LOGIN");

  • How to call Flex app from Javascript in portal question

    I've setup my flex 4 app with a callback function. The flex app is embedded in a Java portlet on a WebLogic Portal 10.3.2. How can I call the Flex app from the portlets javascript function? Code below shows how the flex app is embedded in the wrapper jsp.
    <script language="JavaScript" type="text/javascript">
            AC_FL_RunContent(
                        "src", "<%= srcPath %>",
                        "id", "<%= (String)request.getAttribute("portlet_name") %>",
                        "name", "<%= (String)request.getAttribute("portlet_name") %>", 
                        "width", "<%= request.getAttribute("width") %>",
                        "height", "<%= request.getAttribute("height") %>",
                        "align", "middle",
                        "quality", "high",
                        "FlashVars", "PORTLET_WS=<%= request.getAttribute("window_state")%><%= wsrpEncodedChannel %>",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash",
                        "pluginspage", "http://www.adobe.com/go/getflashplayer");         
    </script>

    Thanks for the response. I followed the instructions in the link, but it does not appear to work within a Weblogic 10.3.2 portal. My Flex app is wrapped in a Java JSR 286 portlet. Should this approach work or is there a different approach for the portlets wrapper JavaScript to call a Flex callback function?
    thanks
    Dan

  • Have you used Macromedia Flex?

    Have you used Macromedia Flex? What's your opinion of it? My manager is good at
    latching onto the flavor-of-the-week, but things I've read about Flex makes it sound
    pretty good. Does anyone have any war stories?
    Thanks,
    Laszlo

    From what I understand, Flex can be compared, roughly to JSP:
    JSP:mixes html markup (typically) and jsp tags with Java and JavaScript in a text file (*.jsp).
    The jsp-engine compiles that and what's delivered to the client's browser is html+JavaScript.
    Flex: mixes XML markup with STL-like tags and tags for controls (they claim dozens, including tree
    and calendar controls, editable comboxes etc...) and tags for layout (think LayoutManagers).
    The event handlers are written in ActionScript which is supposed to be very JavaScript-like (and
    in one place I read it was statically typed, hurrah!). Again this goes in a text file (*.wxml).
    The Flex engine compile *.wxml files into flash programs (*.swf) and delivers this to Flash running
    on the client. Flash, not the browser, executes the dynamic content.
    Here are some of my concerns and non-concerns:
    The Ubiquity of Penetration (is that an episode of Oz or what?) Flash is on a lot of desktops, but
    Macromedia plays Three Card Monty by not pointing out that Flex needs the latest version (7)
    to run, and that version is not everywhere, yet. But as their surveys show, it may be everywhere within a year.
    This is a non-concern for me. I write apps for gov't employees so I've got a different issue: many of them
    work in the boonies where their LAN support is execrable. And on top of that, their desktops are so screwed
    down, the only thing they can install are browser plug-ins. So Flash fits.
    The cost. Flex retails for $12,000 USD. That's seems a lot to me for something that's just in
    the presentation layer.
    This is version 1.0. Flash may be stable but how buggy is Flex?
    Where's the Java?. ActionScript is supposed to be Java-like, but what would be cool would being
    able use a subset of Java and the API for the dynamic content. This could be compiled on the server-side
    and something like byte code could be sent to Flash to execute.
    How fast and responsive are the Flash programs?
    How big are the Flash programs generated by Flex to download? And how good are browsers at
    caching flash programs? Do they use the same mechanism as for caching images? I'd hate to
    redownload a flash program over a dialup line when bouncing between screens.
    How good are the controls that Flex delivers? How does it compare to Swing, say. How comprehensive
    Is their set of events?
    What do you need on the server-side? Flex communicates to sever apps via (1) Web Services
    (2) remote objects or (3) http calls, among other things. The Flex engine itself is a web-app, and
    they list their system requirements as WebSphere 5+ (although it runs in Tomcat 5.0). Unfortunately,
    our production admins only support WebSphere 4 Server.
    Aside: I went to a product demo on Monday, and I have to say salesmanship in software products
    creeps me out. Maybe because I came into programming through the back door, from math and logic,
    but at demos I feel like I'm being sold a used car. The presenters kept referring to ROI. What do I know
    about ROI? I thought they were talking about Le fils do roi...

  • Multiple Flex Apps on One Page

    Now that I've been laid off from Adobe (along with 700 others), I would like to seek Flex consulting opportunities, and one possibility is with web designers/developers wishing to offer their clients value added components.
    My question is that I heard you don't want for example three separate Flex apps on one web page, as it results in three instances of the Flash Player generated, or something like that.
    So is it necessary to group multiple Flex components into one Flex app to each web page? This can limit placement of Flex components on a web page, because the web page will not be completely done in Flex, as the page must be searchable.
    Any insight on this, particularly from Alex and others on the Flex product team at Adobe.
    Anyone new to Flex needs help on Flex components/applications, I'm available: [email protected]
    Thanks!
    Greg

    IMHO, it is all about memory.  Lots of pages have multiple flash players running banner ads.  That's because those ads are small.  If you're going to stick a couple of really small flex apps on a page, I would expect most folks have enough computer resources to handle that.  Once you get more complex, your apps also likely take up more screen real-state and soon you're looking at a portal and probably should have one main shell that loads sub-apps.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Flex app doesn't work when moved from original location

    I'm trying to make an image gallery in flex. It works when I run it in Flex Builder perfectly fine. The html and swf files from the bin-debug folder work perfectly fine when opened in any browser also, but ONLY when those files and all related files are opened from the default location that the application was built in. When I export a build to a different folder, the swf loads but none of the information from the xml file displays. I tried setting all of the paths of the reference files (namely the xml) in the flex app to the exact absolute location on the server, and it still didn't work when I uploaded it to the server.
    I've tried several approaches starting from scratch and they have all come up with the same issue. I'm working with an educational license for Flex Builder, I'm not sure if they jip you on those and ruin the compiled swf.
    Please help! I'm losing my mind over this.I think it has to do with something else besides the code since it works fine when I hit "Run", but if anyone thinks it will help to post the code let me know.

    when you build an application using one of the wizards (like coldfusion flex application wizard) it hard codes
    paths to cold fusion CFC's, and sometimes gets it wrong.
    If your application references cfc's (or other remote objects) then it may be necessary to adjust the flex code
    when moving the code into a different base folder.
    For example in my own application, the url is http://localhost/crm_dev_flex and the built application gets put into
    c:\inetpub\wwwroot\crm_dev_flex\bin-debug
    References in the code to components found in c:\inetpub\wwwroot\crm_dev_flex\bin-debug\components\cfgenerated
    (in the flex code these looks like crm_dev_flex.bin-debug.components.cfgenerated.<mycomponent> )
    These need to change when you move the code to somewhere else.
    Also, if you are using wizard generated cfc's then these also contain similar references that need to be changed.
    IHTH.
    Cheers

  • File not Found Error in Flex APP-MDI

    Hi Friends,
    In my Flex APP-MDI application  have error.Th error is given blew.How can i solve this problem,please any one help to me.
    Error:
    File not found: file:/C:progmfiles/AdobeFlashBuilderBeta2/amdiBasicExample_1_1_1/bin-debug/amdiBasicExamp le.html
    Thanks,
    Magesh R.

    You would do better to ask this in the developer forum, not the user forum.

  • I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build.  The same call works fine when running on the device

    I have a production mobile Flex app that uses RemoteObject calls for all data access, and it's working well, except for a new remote call I just added that only fails when running with a release build. The same call works fine when running on the device (iPhone) using debug build. When running with a release build, the result handler is never called (nor is the fault handler called). Viewing the BlazeDS logs in debug mode, the call is received and send back with data. I've narrowed it down to what seems to be a data size issue.
    I have targeted one specific data call that returns in the String value a string length of 44kb, which fails in the release build (result or fault handler never called), but the result handler is called as expected in debug build. When I do not populate the String value (in server side Java code) on the object (just set it empty string), the result handler is then called, and the object is returned (release build).
    The custom object being returned in the call is a very a simple object, with getters/setters for simple types boolean, int, String, and one org.23c.dom.Document type. This same object type is used on other other RemoteObject calls (different data) and works fine (release and debug builds). I originally was returning as a Document, but, just to make sure this wasn't the problem, changed the value to be returned to a String, just to rule out XML/Dom issues in serialization.
    I don't understand 1) why the release build vs. debug build behavior is different for a RemoteObject call, 2) why the calls work in debug build when sending over a somewhat large (but, not unreasonable) amount of data in a String object, but not in release build.
    I have't tried to find out exactly where the failure point in size is, but, not sure that's even relevant, since 44kb isn't an unreasonable size to expect.
    By turning on the Debug mode in BlazeDS, I can see the object and it's attributes being serialized and everything looks good there. The calls are received and processed appropriately in BlazeDS for both debug and release build testing.
    Anyone have an idea on other things to try to debug/resolve this?
    Platform testing is BlazeDS 4, Flashbuilder 4.7, Websphere 8 server, iPhone (iOS 7.1.2). Tried using multiple Flex SDK's 4.12 to the latest 4.13, with no change in behavior.
    Thanks!

    After a week's worth of debugging, I found the issue.
    The Java type returned from the call was defined as ArrayList.  Changing it to List resolved the problem.
    I'm not sure why ArrayList isn't a valid return type, I've been looking at the Adobe docs, and still can't see why this isn't valid.  And, why it works in Debug mode and not in Release build is even stranger.  Maybe someone can shed some light on the logic here to me.

  • Deployment of Flex app to web and app server

    Hi
    I'm working on putting a Flex front-end on an existing J2EE
    app which gets deployed as an ear file. The architecture consists
    of web server, app server and database server. Is the following
    approach to deployment possible / recommended?
    My Flex app will be deployed to the web server. The J2EE ear
    file will be deployed to the app server (Weblogic). BlazeDS will be
    bundled within the ear file as a war file. Remote Objects will be
    configured in my BlazeDS configuration files to enable me to access
    the code in my J2EE app. In the compiler options of my Flex app,
    I'll be setting the server root folder and server root URL to point
    to the BlazeDS war file on my app server.
    At present I'm at the stage where I can run my Flex app
    directly from Flex builder on my development PC and it's able to
    connect tto the J2EE app, which is running on the app server
    (Weblogic) also on my development PC. I can't find documentation
    explaining how to extend this to work on a multi-tier architecture.
    Thanks
    David

    Hi,
    I replied to your post in FDS forum. Please visit the URL
    below for the response.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=583&threadid=1373523
    Hope this helps.

  • Adobe AIR Needed on Android / iOS to Run Adobe Flex Apps

    Hi all,
    I want to confirm if the user has to install Adobe AIR before launching Adobe Flex apps on Android and iOS Devices. Is there any way that we could embedd Adobe AIR setup in the app file so that the user dont have to hastle in installing Adobe AIR.
    Taimur

    It gives you only three options:
    Signed packages for each target platform.
    Signed AIR package for installation on desktop.
    Intermediate AIRI package that must be signed later.
    For mobile apps, we need to select the first option to get the .apk and .ipa file as the second option would generate .air file. None of the options offer to package AIR runtime. Only the first option gives you the option on NEXT window to include the download link of AIR Runtime.
    If i am wrong, kindly point me to that specific checkbox.
    OR do i have to put Runtime.apk in the assets folder of my source code so that it gets packaged?

  • Flex App with remoting works on local Apache server - fails on production server

    Hi Everyone,
    I have a Flex app that uses Data Services. The application works correctly on my local Mac Server and Apache. When uploaded to my production CentOS server, the Data Services fail. When the app is done loading, the following error message comes up:
    Class "ModelsService" does not exist: Plugin by name 'ModelsService' was not found in the registry; used paths:
    : /www/html/mdubb//PHP2/bin-debug/services/
    #0 /var/www/html/mdubb/ZendFramework/library/Zend/Amf/Server.php(550): Zend_Amf_Server->_dispatch('getAllModels', Array, 'ModelsService')
    #1 /var/www/html/mdubb/ZendFramework/library/Zend/Amf/Server.php(626): Zend_Amf_Server->_handle(Object(Zend_Amf_Request_Http))
    #2 /var/www/html/mdubb/PHP2/bin-debug/gateway.php(73): Zend_Amf_Server->handle()
    #3 {main}
    Where getAllModels is a method of my custom ModelsService.
    I changed the Zend path in the amf_config.ini file so it references the correct directory. If I browse to gateway.php, it prompts to download the file, which I think is correct.
    I added in the config file the path to the services folder.
    I tried adding $server->addClass("ModelServices") in gateway.php, but it didn't like that.
    The file structure on the production server is the same as the local server (I litterally uploaded everything in my local web root), so I can't think of what would be differenet between the two.
    I have already pulled one all nighter trying to get this to run. Do you know what I should troubleshoot next?
    Thanks in advance,
    Ryan

    Hi,
    With reference to Lumira 1.15, the minimal SP we support is BI 4.0 SP6. Please upgrade at least to this. Everything is detailed in the PAM https://websmp107.sap-ag.de/~sapidb/011000358700001095842012E
    Best regards,
    Antoine

  • Loading purchased swf into Flash Builder 4 Flex app

    I have purchased a Flash "fundraising thermometer" from an online Flash components site. It takes input from an xml file and displays a thermometer with the goal at the top and the current amount raised indicated. It came with the following files:
    thermometer.swf
    thermometer01.fla
    thermometer01.html (A sample that works.)
    xml/thermometer.xml (The source file: goal amount, current amount, mark interval, etc.)
    caurina/transitions (Mostly .as files.)
    Since the test html (thermometer01.html) works fine, I thought this would be a no-brainer.
    I first unzipped the files into a "thermometer" folder in my current project. I then went into Flash Builder and created a SWFLoader object as follows:
    <mx:SWFLoader 
    id="myLoader" source="../thermometer/thermometer.swf" complete="initThermometer();" autoLoad="true" scaleContent="false"/>\
     private function initThermometer():void { 
         Alert.show('Thermometer loaded');
    The Design view looks fine. I can see the thermometer default image (see below).
    When I run the app, I get no errors, just a broken image link in a box (see below). The alert box also never shows up.
    I'm new to Flex, so I may be doing something stupid that keeps this from working. I contacted the author of the thermometer widget but he doesn't know anything about Flex.
    Any help figuring out how to get this to work in a flex app would be appreciated.

    You should probably add more event handlers to see what's going on.  Especially "ioError". The complete list is below.  For coverage, add a handler for each event. You can also use in MXML
         complete="initThermometer(event)
    and add an argument to your Actionscript method, to find out details about the event.
    private function initThermometer(event:Event):void { 
         Alert.show('Thermometer loaded ' + event.type);}
    Events
        complete="No default"
        httpStatus="No default"
        init="No default"
        ioError="No default"
        open="No default"
        progress="No default"
        securityError="No default"
        unload="No default
    General info here:
         http://livedocs.adobe.com/flex/3/langref/mx/controls/SWFLoader.html
    I did not test my code suggestions, but it's probably close.

  • Why would I need to use LiveCycle Data Services in a Flex app?

    I cannot figure out what additional functionality is provided by using LiveCycle Data Services in my Flex apps.  I cannot get a clear understanding of how using LiveCycle Data Services would benefit my applications.  Does someone out there use LiveCycle Data Services?  If so, what do you do with it in Flex?
    Thanks!

    - data push for publish/subscribe implementations
    User has to do nothing to get updated information. You push it to their machine when new data is available, like Yahoo finance updated quotes.
    - data paging
    You don't want to display one million rows in your datagrid at once. Get a batch of data, if the user scrolls down, get the next batch, etc.
    - server side clustering
    One server does not get overloaded. High traffic sites have their large number of concurrent connections managed more efficiently.
    - JMS services
    JMS is a powerful technology for messaging throughout an application, and LCDS makes it much easier.
    - RTMP tunneling
    Allows the use of the RTMP protocol in LiveCycle Data Services applications. Makes it easier to traverse firewalls and proxies appropriately that currently prevent direct RTMP client connections to the server.
    If this post answered your question or helped, please mark it as such.

  • A Flex App in browser is a swf file or translated to Javascript

    A Flex App in browser is a swf file or translated to Javascript?
    Like Flash web site plugins [not whole browser window], exist and Flex plugins?
    These are both swf files only without other supporting files?

    A Flex app is a SWF and is not translated to Javascript.  Many Flex apps do
    use Javascript to handle history management and startup focus.

  • Photo effects in flex app

    HI,
    I have implemented basic image effects into flex app, such as opacity, darkness etc.  I am looking for some advanced effects such as, paint, cartoon etc, ones you can find in fotoflexer.com or lunapic.com
    Can anybody suggest something? algorithms?

    So, I'm going to take this as no one's noticed, and no one knows how to get these effects in other apps. Thanks everyone!

Maybe you are looking for

  • Error installing SAP NetWeaver 7.2 ABAP Trial Version

    Hi, At the beginning of the installation of SAP NetWeaver 7.2 ABAP Trial Version the following error occurred: Program is starting... Please wait! ERROR      2010-12-28 18:58:18.804 syxxcniwrapper.cpp:105 NI::CNIInit::CNIInit() lib=syslib module=sysl

  • Macbook Pro Retina - Your computer restarted because of a problem

    Hi there, I've recently experienced problems with my Macbook Pro Retina(A1398) with freezes. It's very often and randomly freezing and it gets hot on the top of the back in the middle. When I start it up it freeze again at the spinning wheel, but I c

  • File sender channel - file name "null"

    Hi all, I am designing a scenario where I am reading 2 files from 2 different senders, and these 2 messages are fed to a multi mapping in BPM, which creates a single target message. I need to read the name of only one of the two source files and popu

  • Firefox will not go to mail after log in to hotmail.co.uk

    Message Internal server error - read followed by long reference. I have uninstallled and reinstalled Firefox without clearing problem. Had worked for 2+years without a problem. == URL of affected sites == http://hotmail.co.uk == User Agent == Mozilla

  • Javadoc for jcapi of Calendar server 2004Q2

    Is javadoc for jcapi of Calendar server 2004Q2 available? We would like to develop our calendar application but we don't want to write low-level WCAP over HTTP.