Pergunta

Eu implementou um gSOAP c ++ webservice-servidor a ser acessado pelo Flash (AS3) tudo corre suave enquanto eu testar o .swf localmente, o .WSDL está bem carregado, e os trabalhos de comunicação, mesmo com o servidor em execução no um IP externo já.

Mas no momento eu coloquei que .swf online - sua chegando com violações de segurança sandbox chorando sobre o padrão - esquemas como esse:

Error: [strict] Ignoring policy file at http://schemas.xmlsoap.org/crossdomain.xml 
due to incorrect syntax.  See http://www.adobe.com/go/strict_policy_files to fix this 
problem.

*** Security Sandbox Violation ***
Connection to http://schemas.xmlsoap.org/soap/encoding/ halted - not permitted from 
http://mydomain.com/main.swf
Error: Request for resource at http://schemas.xmlsoap.org/soap/encoding/ by requestor  
from http://mydomain.com/main.swf is denied due to lack of policy file 
permissions.

Alguém pode me ajudar com esse problema?

Ou há talvez uma boa maneira de definir um webservice-método simples (como stringResult = comando (stringSessionId, stringCommand, stringParams, stringResult)) sem o carregamento .WSDL - arquivo? Se eu tivesse essa possibilidade eu não teria que tropeçar sobre isso sandbox - coisas.

Qualquer ajuda apreciado.

Foi útil?

Solução 3

Thanks for the comments. The real problem here is, that the gSoap - generated wsdl - file tries to "access" these domains all over the place, so that crossdomain - stuff is out of my hands. Anyway i solved the issue now by writing the wsdl by hand without all that wsdl gsoap mega bloating, so its just accessing the w3c.* domains and they ARE obviously crossdomained right.

Outras dicas

arquivo de política crossdomain está ausente. Deve ser pelo este local . Você é capaz de carregar 'wsdl' de sua máquina local, porque o seu sandbox é (sandbox ou seja mais conveniente) confiável local. Assim, atualmente eu não consigo ver nenhuma maneira de conseguir isso flash a menos que haja arquivo de política crossdomain no local desejado.
Mas você pode tentar Servidor Side Método Proxy para carregar o WSDL.

Flash doesn't allow loading content from domains other than the one where your SWF is hosted unless those domains allow you to do it. Remote domains can choose to allow SWFs in your domain to load content from them using a crossdomain.xml policy file hosted at their web root.

Here are some sample policy files : YouTube, Twitter. Check the Adobe link on policy files to know more.

The error message "ignoring due to incorrect syntax" indicates that the policy file is present there but not well formed or has some syntax errors. But I cannot find anything at http://schemas.xmlsoap.org/crossdomain.xml.

Where is your web service hosted? What are you trying to load from http://schemas.xmlsoap.org/soap/encoding/?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top