Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

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
14 Replies

Avatar

Former Community Member
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

Former Community Member
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

Former Community Member
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

Former Community Member
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

Former Community Member
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