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.

Failed to load policy file from http://dev-edeliveryapps.us.sunlife/crossdomain.xml

Avatar

Level 1

Hi There,

          I am facing a problem while calling a web service built in Java through flex,I am using the flex 2 for client side ,and Weblogic Server 10 for  webservice

The WSDL URL is http://dev-edeliveryapps.us.sunlife/edelivery/EDeliveryQueryService?WSDL

My application URL is http://dev-workbench.us.sunlife/

I kept the Crossdomain.xml file in root folder of Server , and also at almost every location of my application including the root folder of the application,

But still I am getting the Following error .The Warning says that -->>Failed to load policy file from http://dev-edeliveryapps.us.sunlife/crossdomain.xml but that location is of java web service.Do I provide the the crossdomain file to web service Vendor to keep in java side also,if yes then which location will be ther for that,Any Suggestion would be a great help

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Warning: Failed to load policy file from http://dev-edeliveryapps.us.sunlife/crossdomain.xml

*** Security Sandbox Violation ***

Connection to http://dev-edeliveryapps.us.sunlife/edelivery/EDeliveryQueryService?WSDL halted - not permitted from http://localhost:8302/flex/Workbench-Dev/flex/test.mxml.swf?debug=true

[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://dev-edeliveryapps.us.sunlife/edelivery/EDeliveryQueryService?WSDL)"]

at WSDLParser/dispatchFault()[C:\dev\enterprise_gmc\frameworks\mx\rpc\soap\WSDLParser.as:209]

at WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler()[C:\dev\enterprise_gmc\frameworks\mx\rpc\soap\WSDLParser.as:203]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AbstractInvoker.as:145]

at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AbstractInvoker.as:194]

at mx.rpc::Responder/fault()[C:\dev\enterprise_gmc\frameworks\mx\rpc\Responder.as:56]

at mx.rpc::AsyncRequest/fault()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AsyncRequest.as:107]

at DirectHTTPMessageResponder/securityErrorHandler()[C:\dev\enterprise_gmc\frameworks\mx\messaging\channels\DirectHTTPChannel.as:346]

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/redirectEvent()

Error: Request for resource at http://dev-edeliveryapps.us.sunlife/edelivery/EDeliveryQueryService?WSDL by requestor from http://localhost:8302/flex/Workbench-Dev/flex/test.mxml.swf?debug=true is denied due to lack of policy file permissions.

Regards

2 Replies

Avatar

Level 1

I'm having a similar issue with loading a policy file.  My problem is that everything works in Firefox 3, but I'm getting a security sandbox error due to the fact that I cannot load the policy file in IE7.  I was unable to get the web services to connect using the mxml tags, so I went ahead and built them using actionscript. I'm guessing you're having a problem because the web services are initiated through the mxml and then you're trying to load the policy file in an init function after the application is completed.

Try this in your init function to create your web services in actionscript:

var ws:WebService = new WebService();

ws.loadWSDL( "wsdl path" );

var op:Operation = ws.getOperation("methodName") as Operation;

op.resultFormat = "xml" or "e4x";

op.addEventListener( ResultEvent.RESULT, resultHandler );

op.addEventListener( FaultEvent.FAULT, faultHandler );

I'm loading a secure web service from an unsecure domain, so I need to add in an encoded header to the webservice.

Hope this fixes your problem and let me know if you know how to load a policy file in IE7.

Avatar

Former Community Member

based on crossdomain.xml specification FlashPlayer  will be looking for main crossdomain.xml file in the root of the domain so, error message is correct,

FP can not possible know architecture of your service etc ... so it will just take url append crossdomain.xml to it and try to load it.

(I am not sure if you can change the location of Main crossdomain.xml file) I beleive it can only exist under root, but others you can place it anywhere you like

(if you have more than one).

simple test is following if

http://dev-edeliveryapps.us.sunlife/crossdomain.xml

is accessible through browser ,  than your problem is solved.