Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of Flex calling Webservice across domains

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to solve Flex cross-domain call Webservice problem, Xiaobian thinks it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.

Flex cross-domain invocation of Webservice issues

Recently in Flex to do a project, in the native debugging everything is normal, transmitted to the server after the following error:

[RPCFaultfaultString="Securityerroraccessingurl" faultCode="Channel.Security.Error" faultDetail="UnabletoloadWSDL.

To find out if it is the cross-domain access security mechanism problem of swf file, the simplest solution is to add a policy file to the root directory of the invoked webservice server. The default name is crossdomain.xml and the content is as follows:

cross-domain-policy>

It can also be called in code

flash.system.Security.loadPolicyFile(http://mydomain/crossdomain.xml); method to load a policy file.

◆ After adding the policy file, I thought that this should not be possible, but unfortunately a new error occurred. This error message is different, but it is also related to cross-domain access. The error is as follows:

[RPCFaultfaultString="Securityerroraccessingurl" faultCode="Channel.Security.Error" faultDetail="Destination:DefaultHTTP"]

Finally found that flash player version updated to 9.0.124, there are a lot of security changes, so caused this error, the solution is also very simple, in the original crossdomain.xml file to add the following code.

About "how to solve Flex cross-domain call Webservice problem" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report