티스토리 뷰

내용 참고 : http://blog.daum.net/nyx21/3484916
 
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
 
HTTPService 데이터 연동 방법은 XML을 지원하는 모든 웹 프로그램에서 가능하다.
XML 데이터만 받아오면 무엇이든 가능하다.
 
주의 할 것은
자신의 로컬서버에 있는 swf 파일에서 다른 서버에 있는 리모트 데이터(XML)을 가져오려할 때 보안문제가 발생한다.
리모트 데이터 접근이 불가능하다.
 
http://aaa.bbb.com/test.html(swf)로 접속 후 XML 데이터를 가져올 때 URL이 http://aaa.bbb.com/data.jsp에서 작성된 XML이라면
동일한 로컬 데이터로 문제가 발생하지 않는다.
 
http://xxx.yyy.com/test.html(swf)로 접속 후 http://aaa.bbb.com/data.jsp를 호출 시 아래와 같은 예외가 발생한다.
[RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]
 
리모트 서버의 접근을 허용하려면 crossdomain.xml에 접근하는 리모트 서버를 등록해야한다.
crossdomain.xml은 웹 서비스 루트 디렉토리에 작성한다.
 
< ?xml version="1.0" encoding="UTF-8"?>
< cross-domain-policy
     xmlns:xsi="www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
< cross-domain-policy>
     <site-control permitted-cross-domain-policies="all"/>
     <allow-access-from domain="xxx.yyy.com" />
< /cross-domain-policy>
 
< allow-access-from domain="허용할 도메인주소" to-ports="허용할 포트번호" />
                              domain="*"              : 모두 허용
                              domain="*.bbb.com" : bbb.com의 모든 호스트에서 접근을 허용
 
--------------------------------------------------------------------------------------------------------------------------
[ crossdomain.xml ]
 
< ?xml version="1.0"?>
< cross-domain-policy>
     <allow-access-from domain="*"/>
< /cross-domain-policy> 

Total
Today
Yesterday
최근에 올라온 글
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31