Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Webservice consumer: works on FlexBuilder fails on Tomcat


Level 1
Hello guys!

I have just started messing around with Flex, and I thought
that a good practice would be trying to connect to one of the web
services that my company offers developing a simple client on Flex.

I used Flex Builder and found it really easy: With only a few
lines of code a really nice GUI... impressive!

So now lets show it to my colleagues...but UPS!

I place the application under my local Tomcat and instead of
retrieving data I get:

[FaultEvent fault=[RPC Fault faultString="Security error
accessing url" faultCode="Channel.Security.Error"
faultDetail="Destination: DefaultHTTP"] messageId=null type="fault"
bubbles=true cancelable=true eventPhase=2]

After a lot of research I cannot make it work... I have read
about crossdomain.xml, I have copied this file into my
tomcat\webapps\ROOT folder allowing all domains:

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "


<allow-access-from domain="*" />

<allow-http-request-headers-from domain="*" headers="*"


Because this crossdomain.xml should be on the server were my
Flex client is placed, isn't it? I have read some articles, and
they say that this XML has to be placed on the server which offers
the web service. I think this cannot be possible, in that case I
have to ask to my IT department to upload that file, and they for
sure aren't going to allow that.

Could you please help me? Why is the client working under
Flex Builder and not when I deploy it on my Tomcat? And when I says
deploy I mean that I have copied what Flex Builder generates on
"bin-release" folder into the Tomcat's webapps folder.

Thanks for your help in advance!
1 Reply


Level 2
the cross-domain file has to be placed on the web service

you can use blazeds or lcds to proxy your ws calls. this
tutorial should help,