invoke remoting endpoint crossdomain

Avatar

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
_Joanna_Gao_
Level 2

09-09-2008

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

Replies

Avatar

10-09-2008

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

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
_Joanna_Gao_
Level 2

10-09-2008

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

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

10-09-2008

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

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
_Joanna_Gao_
Level 2

10-09-2008

We user weblogic.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

612 likes

Total Posts

7,689 posts

Correct reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

10-09-2008

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

Avatar

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
_Joanna_Gao_
Level 2

10-09-2008

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

11-09-2008

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

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
_Joanna_Gao_
Level 2

Likes

0 likes

Total Posts

11 posts

Correct reply

0 solutions
View profile
_Joanna_Gao_
Level 2

11-09-2008

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>