views:

1294

answers:

4

I'm developing a Flex 3.4 app that interops with a Java EE backend running on a JBoss-4.2.2 server, through the most recent release of BlazeDS. When I ran the Flex app from Flash Builder 4 beta 2 on Tomcat, everything was fine, the Flex app was able to make the remote call needed. But my production environment is on JBoss, and when I moved the app to JBoss (with services-config.xml updated to fit JBoss), the Flex app keeps complaining Client.Error.MessageSend upon remote calls. At first, when I manually deployed the app to JBoss, the faultDetail was "Channel.Security.Error error Error #2048 ... "; later I tried to run the app from Flash Builder, and then faultDetail became "Channel.Connect.Failed error NetConnection.Call.BadVersion".

In services-config.xml, under <security>, was:

<login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>

when moving to JBoss, I updated it to:

<login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>

I have a crossdomain.xml placed in JBoss' deploy folder, as follows:

<?xml version="1.0"?> 
<!DOCTYPE cross-domain-policy 
    SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&gt; 
    <cross-domain-policy> 
    <allow-access-from domain="*" /> 
</cross-domain-policy>

But looks like it doesn't work. I've also tried to put crossdomain.xml in deploy/xxxxx.war folder, and the problem remains.

I'm using http://, not https://, so I guess it's not about security channel.

Tried to search for a solution, but most solutions were PHP related, which wasn't really helpful. Any one got any clues?

A: 

If you browse to http://your.application.root/crossdomain.xml, does the file load? The simplest configuration is to put the file at the root of the domain.

cliff.meyers
Yep, I can access crossdomain.xml from `http://{server.name}:{server.port}/{context.root}/`.
Saito
It sounds like you've resolved the cross domain issue then. You're now receiving only the NetConnection.Call.BadVersion error?
cliff.meyers
A: 

hey.....i m a fresher in adobe flex ...i want to ask 1 thing why we need to use cross-domain-policy???..........wat is the need?

kosal
A: 

hey.....i m a fresher in adobe flex ...i want to ask 1 thing why we need to use cross-domain-policy???..........wat is the need?...........i was having same problem ..i hav added the folowong code to my services-config.xml file.............

kosal
A: 

you have where the class indicates that security is of tomcat you should change it to a class that implements the interface flex.messaging.security.LoginCommand or any security interface blaze.

coty