Skip navigation
Currently Being Moderated

BlazeDS and Flex Intergration Problems

Jul 7, 2010 8:59 AM

Hello All.

 

I have  downloaded BlazeDS4 and installed it onto a windows server using  tomcat.  I have then been able to log into this server and use the  examples provided using this address - http://localhost:8080/   I should note, that this link also works on remote computers by giving  the correct IP address instead of localhost.

 

So i know  that Blaze is working fine.

 

But now i want to configure this with Flash  Builder 4, so that i can try and create my own apps.

 

I go "File  > New > Flex Project "

 

Then i select J2EE from Server Technology, and  then select "BlazeDS"

 

Now this is where i get stuck, I don't know what  settings to put for

 

"Root Folder"  "Root URL" "Context Root"

 

If for  example my server IP is - 10.1.2.12:8400

 

Could somebody talk thru me what  settings i need to use ? I keep getting a message

 

Invalid root. The WEB-INF/flex folder  must contain either flex-config.xml or services-config.xml.

 

If anyone  could help I would be thankful ! !

 
Replies
  • Currently Being Moderated
    Jul 7, 2010 9:23 AM   in reply to djh88ukwb

    You need to set configurations in this way....

     

    1. Set the Root folder to the root folder of your web application with      BlazeDS configured. Its /tomcatworkspace/flexstrutssample in this sample
    2. Set the Root URL to root URL of your BlazeDS enabled web application.      Its http://localhost:8080/flexstrutssample in this sample.
    3. Set the Context root to context root of your BlazeDS enabled web      application. Its /flexstrutssample in this sample.
    4. Leave the output folder to      default value
    5. Click on validate configuration button to check if the values are properly configured. You should see a message at the top saying web root folder and root URL are valid.
    6. Click finish to continue

     

    Hope it will solve the problem

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 7, 2010 8:23 PM   in reply to djh88ukwb

    on the server where you are pointing you flex. do you have the WEB-INF folder as well as the flex folder inside the WEB-INF? if not then first put them b4 u create a flex project using the file>new flex project. ( the java project hs to be at the place where you are pointing.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 8, 2010 4:09 AM   in reply to djh88ukwb

    hi,

     

     

    Did you use the adobe turnkey install with blazeds or did you have your own install ?

     

     

    David

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 8, 2010 4:49 AM   in reply to djh88ukwb

    hi,

     

    If you have 'standard' windows tomcat server running blazeds then your flex config dialog should look something like this

     

    blaze.jpg

     

    David.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 8, 2010 5:10 AM   in reply to djh88ukwb

    hi,

     

    You need to develop locally then move the app to your remote server.

     

    David.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 8, 2010 5:31 AM   in reply to djh88ukwb

    hi,

     

    When you build your app it is normally hardcoded to your services, to get around this you set the channel dynamically in the application, for instance when I did that video thing for you I was lazy so instead of having the config in an xml file that was read from the server the app runs from I just but 2 values into the app and compiled one for local and one that was remote.

     

    protected function application1_creationCompleteHandler(event:FlexEvent):void

    {

    channelSet = new ChannelSet();

    var channel:AMFChannel = new AMFChannel("my-polling-amf","http://localhost:8080/blazeds/messagebroker/amfpolling");

    //var channel:AMFChannel = new AMFChannel("my-polling-amf","http://ezflex.net:8080/blazeds/messagebroker/amfpolling");

    channelSet.addChannel(channel);

    myProducer.channelSet=channelSet;

    myConsumer.channelSet=channelSet;

    cueXML.send();

    myConsumer.subscribe();

    }

    so basically you could read an xml file that had the url in it and use it as the url parameter in the channel.
    David.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 8, 2010 6:37 AM   in reply to djh88ukwb

    hi,

     

     

    You still need to set up your project the normal way for local development, the difference is that rather than using the values read in from the build it overwrites them with your values after the program initialises (basically it pretty much ignores the services-config).  You still need to make sure your message-services etc on the server match your local ones.

     

    I will email you the complete code from the video project so you can see how to modify your project to do the channel setup and change for the producer and consumer services.

     

     

    David.

     
    |
    Mark as:
  • Currently Being Moderated
    Jan 8, 2013 11:00 PM   in reply to David_F57

    Hi David,

     

           I need your complete code from the video project.  My mailId is porchezhiyan.t@riadigitalsolutions.com

     

    Thanks,

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points