Flex and BlazeDS Compile for Deployement

Hi,
I've been following the Flex + BlazeDS tutorial on the Message Service from adobe to start learning working with blazeds. Everything worked out great on the local server of course but I got stuck when it came to moving the files to a remote server. I've looked around quite a lot and found out it's because the compiler feeds the services-config.xml upon compile and at lease in my case won't take and external file. The solution everyone has been posting on the net is writing the channels in actionscript within flex and feedin it the valid endpoint that would be found in the xml configuration file. That's all nice and dandy but everyone has been talking and showing examples of this being done for RemoteObject and I haven't managed to find any examples for Messaging.
Can anyone help me out with an example on how to deploy my application to a server? (either by coding the channels in AS or otherwise) The application itself is pretty basic...
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="200" minHeight="480" creationComplete="consumer.subscribe()" width="250" currentState="EnterName">
<fx:Script>
  <![CDATA[
   import mx.messaging.events.MessageEvent;
   import spark.events.TextOperationEvent;
  ]]>
</fx:Script>
<s:states>
  <s:State name="Chat"/>
  <s:State name="EnterName"/>
</s:states>
<fx:Declarations>
  <s:Producer id="producer" destination="chat"/>
  <s:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"/>
</fx:Declarations>
<fx:Script>
  <![CDATA[
   import mx.messaging.messages.AsyncMessage;
   import mx.messaging.messages.IMessage;
   private function send():void{
    var message:IMessage = new AsyncMessage();
    message.body.chatMessage = user.text + ":" + " " + msg.text;
    producer.send(message);
    msg.text = "";
   private function messageHandler(message:IMessage):void{
    log.text += message.body.chatMessage + "\n";
  ]]>
</fx:Script>
<s:Panel title="Chat" width="100%" height="100%">
  <s:TextArea id="log" height="377" x="10" y="10" width="228" includeIn="Chat"/>
  <mx:ControlBar width="246" height="52" x="1" y="395" includeIn="Chat">
   <s:TextInput id="msg" width="100%" enter="send()"/>
   <s:Button label="Send B" click="send()"/>
   </mx:ControlBar>
  <s:TextInput includeIn="EnterName" x="60" y="177" id="user" />
  <s:Button includeIn="EnterName" x="87" y="207" label="Start Chat" id="chat" click="chat_clickHandler(event)"/>
  <s:Label includeIn="EnterName" x="57" y="157" text="Please Enter Your Name"/>
  </s:Panel>
</s:Applicatio>
And besides that in the messaging-config.xml file on the server a destination with the id="chat" is created and that's it.
Any help or pointing in the right direction will be greatly appreciated.
Thank you,
Nick

Update:
Ok...I finally figured out that by replacing the tokens in the services-config.xml file with the physical address of the server everything works.
Anyway...this means the application needs to be compiled everytime it is moved to a new server or even a different folder on the same server for that matter. Is there any way to pass the {server.name}, {server.port} and {context.root} tokens to the application at runtime for messaging?
Thanks,

Similar Messages

  • Suggestion for good book/reference of flex and blazeDS

    hi...been developing the client side with flex for some time and now getting into server side and found some stuff from adobe and other short articles about blaze and servers but really looking for a good book/reference...thought i'd buy a book called enterprise flex with blazeds by brian someone....worst IT book i've ever read...any ideas would be great

    Update:
    Ok...I finally figured out that by replacing the tokens in the services-config.xml file with the physical address of the server everything works.
    Anyway...this means the application needs to be compiled everytime it is moved to a new server or even a different folder on the same server for that matter. Is there any way to pass the {server.name}, {server.port} and {context.root} tokens to the application at runtime for messaging?
    Thanks,

  • Getting Started with Flex and Java RPC for Free?

    Good Morning,
    Please forgive me if this is the wrong place to post- I'm
    just having trouble wrapping my head around what is and what isn't
    available for free in the Adobe Flex world.
    I've been working on an application for the last few months
    using Open Laszlo (
    http://www.openlaszlo.org/),
    but I've been running into frustrations with their lack of
    up-to-date documentation, and I've found it difficult to bring new
    people into the project, since the set of users who know it is so
    small.
    While I do like that I can compile to DHTML, that's not
    enough to hold me there.
    I've been looking into Adobe Flex, and it seems like a good
    alternative- I'm comfortable paying $500 for the IDE-
    I use Eclipse currently, so having a plugin for it sounds
    ideal. That said, when I look into ways to talk to a Java backend,
    everything points to Flex Data services, which is now part of some
    larger package costing tens of thousands of dollars.
    I don't need advanced messages, or data synchronization, as
    nice as it would be.. All I really need is the ability to call a
    Java method, and get an object back, which I can then work with in
    Flex.
    I see the forum message that asks
    "How
    do I 'do' Flash for free?, but this only talks about RPC very
    broadly. Given that the message is from over a year ago, I thought
    it would be better form to start a new topic, than replying to it.
    Can someone explain to me what components I'd need, both on
    the client side and the server side?
    Is there a set of manuals that explain how to do Flex RPC
    from Java?
    Can Flex compile to any versions of flash earlier than 9?
    (Flash 6/7 is still in wide deployment)
    Do I want to start using Flex 2, or Flex 3? Are the
    components compatible? Will the F3 docs be ready?
    Finally, where can I purchase the Charting components? The
    ability to create charts such as
    this
    overcome a decent price barrier.
    Thank you for any insight you can offer, and direction you
    can provide.

    quote:
    Originally posted by:
    cunparis2day
    On our project they made a proxy in java where they passed in
    the name of the method as a string, and an array of objects for the
    parameters. The proxy then sent the request via RMI and returned
    the result. Kind of a hack but they say it worked (I wasn't here
    when they did it).
    What did the RMI talk to? Are there docs on this?
    quote:
    Another approach, generate the proxy from the java
    interfaces. Or better yet, generate it dynamically with CGLIB.
    quote:
    Finally, I'm investigating using Mule for the integration.
    Let me know what you think about those suggestions.
    We have our own messages, but how would MULE translate them
    to Flex?
    You know quite a bit more about this, can you take a step
    back, and explain?

  • Understanding JavaFx, Flex, and Openlaszlo offerings for RIAs

    I'm interested in improving certain aspects of my UI and I recently stumbled upon javafx/flex/openlaszlo (OL). I'd like to understand:
    1. What is needed to develop & deploy javafx. Does it have "gotchas" like Flex, where the sdk is open source, but development and deployment tools are proprietary?
    2. How easy is javafx to pickup?
    3. Specifically, I'd like to use javafx ( or flex/OL) to either augment or replace an editable table I created using js, ajax, html, and css. Is this the type of thing javafx can/should be used for? Are there any drawbacks or pitfalls to using javafx for this rather than straight js, ajax, html, css?
    4. How does javafx compare to flex/OL (as this is a java forum, I do understand that people may not have used flex/OL; but any subjective/objective feedback is helpful)?
    Thanks.

    Does it have "gotchas" like Flex, where the sdk is open source, but development and deployment tools are proprietary?Currently, yes... Only the compiler is open source, the runtime is currently closed. Although it isn't unreasonable to think it might be (at least partially) opened in the future, once it is stabilized.
    Development: can be done with a simple editor and the compiler, and deployment with the command line utility. That's what I use. You can also use NetBeans (open source, decent support of JavaFX) or Eclipse (open source also, support of JFX is a bit lacking, from what I know).
    2. The base is quite easy. You have to forget some habits (from Java in general), you have to know some workarounds, but basically it isn't really hard to learn.
    3. Table support is currently light, it is planned to be more comprehensive. Currently, you can use a number of third party table components. Or if you don't care about mobile phone support, you can still use Swing components.

  • Which is better as UI technology among Flex and Oracle ADF for oracle SOA suit

    We have one application which is using oracle’s Service oriented Architecture (SoA) suite. Currently, there is a debate on the technology for UI in the new architecture that will be rich, easy to maintain, scalable and integrates well with SOA suite. We have two options one is Flex and other is Oracle ADF. UI part contains number of graphs, tabular and charts data. So it would be great if any one suggest which technolgy will be better for UI point of view. Thanks in advance.

    Hi,
    I looked at the demo
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF112/ADF112.html
    It's interesting.
    However, I would point out two things:
    1- Before Oracle, Sun failed with UI technologies: there was AWT then Swing then Java FX. None of them was a star. The only place where Sun really won the UI war is the Bluray Disc format.
    2- About half of the RIA in the financial/banking industry are developed with Flex, the other half is developed with Silverlight / WPF. HTML 5 is being taken up by some, but you still end up with the usual problem of having to pick up an AJAX framework, and get tied to a vendor anyway in the end. Never heard about any project developed with Oracle ADF yet.

  • Which is better as UI technology among Flex and Oracle ADF for oracle SOA s

    We have one application which is using oracle’s Service oriented Architecture (SoA) suite. Currently, there is a debate on the technology for UI in the new architecture that will be rich, easy to maintain, scalable and integrates well with SOA suite.
    We have two options one is Flex and other is Oracle ADF.
    UI part contains number of graphs, tabular and charts data. So it would be great if any one suggest which technolgy will be better for UI point of view.
    Thanks in advance.

    Hi,
    I looked at the demo
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/ADF112/ADF112.html
    It's interesting.
    However, I would point out two things:
    1- Before Oracle, Sun failed with UI technologies: there was AWT then Swing then Java FX. None of them was a star. The only place where Sun really won the UI war is the Bluray Disc format.
    2- About half of the RIA in the financial/banking industry are developed with Flex, the other half is developed with Silverlight / WPF. HTML 5 is being taken up by some, but you still end up with the usual problem of having to pick up an AJAX framework, and get tied to a vendor anyway in the end. Never heard about any project developed with Oracle ADF yet.

  • Flex and mobile development for webOS?

    Do the 'Hero' and 'Burrito' products provide the ability to implement Flex code for the webOS platform?  Or is the webOS platform not supported yet?  If Flex isn't ready for the webOS platform now, then I suppose I will need to use JavaScript and HTML 5 on webOS for now.
    The webOS platform is the go-forward strategy for Hewlett-Packard for both smart phones and tablets.

    The right place to look for updates on Flex is http://flex.apache.org
    The good thing is that activities are still going on. The bad things are that:
    - Unless the dependency to Adobe air is cut, Flex as an open source project is bound to fail imho. See FlexJS for updates on that point
    - Current activties seem to be focused around making things more polished rather than working on hard stuff (typically developing an independent and open source runtime execution engine => flexJS)
    So...
    For a small company, home development, not so business critical applications, I recommend warmly Flex, since it is one of the best (if not the best) cross-platform mobile development environment (Very good performances if used appropriately, very good programming environment, lots of components, structured language, lots of documentation and tutorials, easy to design, etc.)
    for business critical applications... The risk is high !

  • What is the state if flex, and air development for air

    Hi,
    1- I wanted to know what is the state of affairs in flex and air as cross platform mobile development solutions?
    2- Are they still worth learning and spending time developing mobile application using these technologies?
    Becuase all the documnetation forum posts and most of the help material I come across is almost a year old.
    Any guidance in this regard would be greatly appreciated.
    Thank you.

    The right place to look for updates on Flex is http://flex.apache.org
    The good thing is that activities are still going on. The bad things are that:
    - Unless the dependency to Adobe air is cut, Flex as an open source project is bound to fail imho. See FlexJS for updates on that point
    - Current activties seem to be focused around making things more polished rather than working on hard stuff (typically developing an independent and open source runtime execution engine => flexJS)
    So...
    For a small company, home development, not so business critical applications, I recommend warmly Flex, since it is one of the best (if not the best) cross-platform mobile development environment (Very good performances if used appropriately, very good programming environment, lots of components, structured language, lots of documentation and tutorials, easy to design, etc.)
    for business critical applications... The risk is high !

  • Help Needed in developing simple Chatting application using flex and blazeds

    Hi,
    I followed this tutorial from adobe http://learn.adobe.com/wiki/display/Flex/Creating+a+BlazeDS+messaging+application+in+Flex+ Builder i installed tomcat server and set the path.I am unable to open server like this http://localhost:8080 but i can able to open that in this way http://127.0.0.1:8080/   .... When i create my new flex project in flash builder 4 i am getting this error
    You do not have write permission for the project output folder. Specify another location.
    can any one help me in how to get rid of this problem.I hope this forum helps me in finishing my flex project..
    Thanks
    Trinethra

    Hi,
    Need to use a scrollable resultset and depending on the need to have a stateful connection or a stateless connection you may need to query the table for every request(for stateless connection) and use the same result set for(stateful connection). and depending on the no of records in a page and the page no do some simple arithmetic and move the resultset. Hope this helps.
    rajesh

  • Flex and multilanguage support for webUI

    I am looking into Flex as the next-gen development system for
    our web apps. I do not know very much about Flex at this time, but
    I need to find out how Flex handles multilanguage capability.
    Currently, we make heavy use of JS and DHTML for our UI
    design, and to support different languages we separate out all our
    strings into individual files (utf8) that are translated. The
    client-side JS will make a call to the server to determine the
    user's language preference and load the appropriate string file
    when rendering the UI.
    I need to know if something like this is possible in the Flex
    environment, or how Flex handles multilanguage string separation.
    Thanks

    Hi Lalo,
    well, I am still not sure what your problem is - but....
    The selection of the Code Group for example happens in:
    BAPI_CODEGROUP_CODE_GETLIST
    Well, this method is called in ALM_ME_CODEGRP_GETDETAIL and there you find the line
    langu              = sy-langu
    so this defines the language.
    Perhaps this helps you to solve your issue and understand the process a little? So you are right - it is the GETDETAIL handler as such - but the language in there is defined by sy-language as you see. Change the language and all should be fine.
    Regards,
    Oliver
    Edited by: Oliver Kaluscha on Jan 30, 2008 2:19 PM
    oh - just to mention - MAM017 and so on are running under the RFC user in the backend - so the language of the current user on the PDA will not really help here I think.
    Regards,
    Oliver

  • Cobol and C Compiler for Sun OS 5.9

    Hi,
    We need to install the following on our Sun Sparc 9 (5.9) OS
    1. Cobol Compiler
    2. "C" Compiler
    Could someone please help us find out where to get these from . If no freeware is available for both these compilrers, then could you please direct us to the right source / vendor
    thanks

    Try;
    http://www.sunfreeware.com/
    The "gcc" compiler may work well for you.

  • How we create .cspack and cscfg and csdef file for deployement service for azure sdk for php

    my project is on php .I want create virtual machine on azure using azure sdk for php but in deployment it need cspack and cssfg file . I want the way to which i get those file .

    Hi Nasreen,
    Thanks for posting here!
    Refer to :
    http://blogs.msdn.com/b/rmattsampson/archive/2014/04/03/azure-development-in-the-azure-sdk-2-3-and-update-2-rc.aspx and
    https://msdn.microsoft.com/library/azure/jj157194.aspx
    Hope this helps!
    Regards,
    Sadiqh

  • How to upload images to server using flex and blazeDS

    Hi All,
         Could you some help me, regarding uploading two images while click on the upload button. i am have two browse buttons and two upload buttons. i am able to select the image, while click on the browse button. but i am unable to upload the image, while click on the upload button. like this, i have to do in my application.
    if some help me i will appreciate , its very urgent.
    Thanks
    venkat

    When uploading a file, I use a byte array as a temporary buffer..
    So, you should then be able to store the byte array in the
    database as binary data.
    example>
    //Temporary Buffer To Store File
    byte[] tmpbuffer = new byte[860];
    //Some Code To Upload File...
    //File Should Now Be In Byte Array
    //Get DB Connection and execute Prepared Statement
    Connection con=//GET DB CONNECTION;
    String sql=insert into TABLE(page) values(?);
    PreparedStatement ps=con.prepareStatement(sql);
    ps.setBytes(1,tempbuffer);
    ps.executeUpdate();
    //Close PS and Free DB Connection
    ..... and this method looks like you dont even have
    to store the file in a byte array, you can just give
    it the input stream.
    ps.setBinaryStream(int, inputStream, int);
    You may have to make several attempts at this. I have
    uploaded a file and temporarily stored it in a byte array,
    but have never from there stored it in the DB as binary
    data.. but this looks like it'll work.
    Good Luck!

  • Flex with Blazeds

    Hi,
    I am new to flex and blazeds.
    Can you please suggest the best links for blazeds.
    I have one query. how i can submit the field values to the backend system with blazeds?
    Please provide any sample links.
    Thanks in Advance.

    try this link:
    http://codeofdoom.com/wordpress/2009/02/01/blazeds-with-remote-objects-example/

  • Oracle SQL Developer Release 1.5.5 "compile for debug"

    Using Oracle SQL Developer Release 1.5.5 on Windows XP pro machine connecting to 9.2.0.4 database on AIX machine.
    Trying to debug a procedure, in the navigator window, I rt-clk the procedure and select "Compile for Debug", then nothing happens. This happens for every procedure I've tried. I've been granted both DEBUG ANY PROCEDURE and DEBUG CONNECT SESSION. Any ideas?

    This is the first I've used SQL Developer, so I'll take the blame. I had not noticed that the Messages Log does in fact tell me that the proc compiled. However, the debug icon (little red bug) was nowhere to be found.
    I see now that I need to Edit, not Open, the proc in order to debug. If I had read the Help screens a little more closely, I would have seen that I needed to be in Edit mode. My bad. Thanx to all for your responses.

Maybe you are looking for

  • How many upgrades do I need to upgrade from 10.4.11 to get to Lion?

    I have been going through all the other posts and my head is spinning.  Some of the answers seem contradictory and confusing esp since I am not all that versed in computer stuff.  Anyway, I have a: MacBook Pro 3.1 Version 10.4.11 2.4 GHz Intel Core2D

  • EAS Updater Not Installing

    Anyone encountered EAS Updater not installing properly.  In the documentation to verify In VersaMail, press Menu . From the Options menu, select Preferences, then select AutoSync. There is now an option for "As items arrive."  I don't see this on the

  • Directory Sync server redundancy.

    How is redundancy for the Directory Sync server accomplished? We have a load balanced pair of ADFS servers, a load balanced pair of ADFS proxies at our primary datacenter. We have additionally deployed an individual ADFS server and proxy at an altern

  • NLS-enabled prompts being ignored

    Hi guys, JHeadstart version 11.1.1.2.46. I've just noticed that even though I have the service level "Generate NLS-enabled prompts and tabs" (with Resource Bundle type set to databaseTable) that none of my item prompts are being created in JHS_TRANSL

  • LX23 - Stock comparison IM - WM

    Hi all, which kind of differences are displayed through the transaction LX23? Thanks a lot, Marco.