I have a flex project which calls a webservice located in some server(www.sapbackendserver.com). If I run my application from my local machine using RUN, it works perfectly(the link in the browser would be C:\Users\m1004968\Documents\SAP UX\Flex Miller Demo\_workspace\MH_Bluebook_Integration\bin-debug\MH_Bluebook_Integration.html). No problems at all. Since this project will be deployed on the server, I created a website using IIS in my local machine for testing and gave "bin-debug" folder(which contains all my assets, swf file and the html file) of my flex project as the root folder for this website. When I click browse on the html file from this website, it opens up the flex application in my browser with this URL: http://172.22.41.154/MH_Bluebook_Integration.html (172.22.41.154 being the IP address of my machine). The application gives me this dump (I've used event.fault.getStackTrace() ):
[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://a2sr10000.sapbackendserver.com:8000/sap/bc/srt/wsdl/bndg_DE71E680280D3EF1B38F001EC9 E805FC/wsdl11/allinone/ws_policy/document?sap-client=800)"]
at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\ rpc\wsdl\WSDLLoader.as:98]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\p rojects\rpc\src\mx\rpc\AbstractInvoker.as:225]
at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder .as:53]
at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:103]
at DirectHTTPMessageResponder/securityErrorHandler()[C:\autobuild\3.2.0\frameworks\projects\ rpc\src\mx\messaging\channels\DirectHTTPChannel.as:389]
I serached the forums with this error, usage of a crossdomain.xml has solved for some of them and has not for the rest. I tried this too(but not sure if the content of my crossdomain.xml was right or not and I am not sure where to even place it )
Currenly the content of my crossdomain.xml is this:
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<allow-access-from domain="*" to-ports="*" />
<!-- This domain can accept any header from a SWF file on any subdomain of example.com and supports https requests -->
<allow-http-request-headers-from domain="*" headers="SOAPAction"/>
And I placed it in 'bin-debug' folder of my flex project that I have used within the IIS. And the Flash Player version in my browser is 10,0,22,87.
Please help me out as I have to present this demo application to one of our prospects by tomorrow.....