web service other domain at flash 9

今天在進行取用其他domain的Web Service,一直發生Security Error的問題,
Security error accessing url
Detail:
Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://xxx.xxx.xxx.xxx/WebService/UploadService.asmx?wsdl)
猜想是crossdomain.xml未放寫了個簡單的允許所有domain進入的.但仍是不行,後來才想到flash 9後安全性有些不同,查名後要改成如下寫法才成功.


<?xml version=”1.0″ encoding=”UTF-8″?>  
<!DOCTYPE cross-domain-policy SYSTEM  
http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd” >  
<cross-domain-policy>  
<site-control permitted-cross-domain-policies=”all” />  
<allow-access-from domain=”*” />  
<allow-http-request-headers-from domain=”*” headers=”*”/>  
</cross-domain-policy>

註.crossdomain.xml要放在web site的最根那一層

本篇發表於 Adobe Flex, 作法。將永久鏈結加入書籤。

發佈留言