Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

invoke remoting endpoint crossdomain

Avatar

Level 2
I need to invoke work process through remoting endpoint in flex app from other domain.



my flex app is on : http://localsever.me.com:9001/test.swf



in this test.swf, I try to invoke a process that is throught remoting end point

http://remote.me.comremoting/remoting/messagebroker/amf



I got error message with "Security Sandbox Violation" error.



Has anybody done this before successfully?



Thanks,



Joanna Gao
1 Reply

Avatar

Not applicable
You can initiate request only on the same domain by default. If your swf is loaded from http://localsever.me.com:9001/ it can do remote calls by default only to the same domain. Otherwise you need a file called crossdomain.xml located on the other domain which will grant permission to your swf.



Read http://labs.adobe.com/wiki/index.php/Flex:Accessing_Data#Using_crossdomain.xml_files for more information

Avatar

Level 2
Thanks for the reply.



I am calling a livecycle service remoting end point, which is generated automatically by LiveCycle for each process.



Do you know where the LiveCycle app root directoy is so I can place the crossdomain.xml file in?



Thanks,



Joanna

Avatar

Level 10
It would be in the app root of the application server that you are running ...not the LC application root.



Which app server are you using?

Avatar

Level 10
If I goto http://hostname:8001 the location that this points to will be where you want to put it.

Avatar

Level 2
That is what I am trying to find out because there are 3 ear files deployed on the weblogic app server. but I am not sure where the port 8001 exactly points too.



Here is the folder structure under myApp server

Bea

-- user_projects

-- domain

-- LiveCycle

-- servers

--Admin

--MyApp

--Cache

--data

--logs

--security

--stage

--tmp



So which folder I should place crossdomain.xml file into? or I have to unzip the ear file to add it in?



Thanks,

Joanna

Avatar

Not applicable
Should be in the ear file (on root). But you can place the file in other places if you want and use Security.loadPolicyFile method

Avatar

Level 2
thanks!<br />I added the crossdomain.xml file into the ear file.<br />and used Security.loadPolicyFile("http://myserver.com:8001/remoting/crossdomain.xml")<br /><br />but flex just ignored my policy file saying: <br /><br />Error: [strict] Ignoring policy file at<br />http://myserver:8001/remoting/crossdomain.xml due to missing Content-Type. See http://www.adobe.com/go/strict_policy_files to fix this problem.<br /><br />Here is my crossdomain.xml. How should I add the content type? Can you provide me example? I am using Flash player 9<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><!DOCTYPE cross-domain-policy SYSTEM<br />"http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"><br /><br /><cross-domain-policy><br /> <site-control permitted-cross-domain-policies="master-only"/><br /> <allow-access-from domain="*"/><br /> <allow-http-request-headers-from domain="*" headers="SOAPAction"/><br /></cross-domain-policy>

Avatar

Level 2
I have read all this. I know I need specify the content-type to be text/x-cross-domain-policy. but I am not sure how to do that..



Can you give me some steps how to change the content-type?



Thanks for the help

Avatar

Not applicable
Unfortunately I do not know WebLogic but I suppose that you can find this information in the WebLogic manuals - or you should find it somewhere on the web.

Avatar

Level 1
did you find a solution to this problem ? We are having the same issue when we deploy the crossdomain.xml to the weblogic server.

Avatar

Level 4
Not sure if there is a simpler way for Weblogic. Following way might work for you



-- Try creating an ear with a single war.

-- Specify the context root for that war in the ear's application.xml as /

-- Place your crossdomain.xml in the war

-- Deploy the ear