I dont know why, but a i've seen a couple of client who use Sockects use two ports - one for the handling requests, and one for the policy file
eg: 8080 - will have Jboss server and 8081 will have another small server(like tomcat) for hosting the policy file(with no securities/authentications etc.,) may b you can try that.
Yeah, first time you need to connect as http, later on you need to connect as xmlsocket. I've posted a link in my previos post, please refer that.
Edit: please ignore this line, but please refer to the link in one of my previous post
I am trying to load a policy file from a remote server so that I can make socket connections to web service.
So I am using the following code to connect to the policy server :
This does not connect to the policy server.
This does connect, but obviously doesn't work (I'm using a simple python server to serve the policy file).
So, any ideas as to why I can make a http connect but xmlsocket fails?
I can telnet from my local machine to the remote machine. The port is open...
You've mentioned that,
does not connect to the policy server. By that, do you mean that it cannot CONNECT or it is able to connect but the cross domain xml is not received?
Also, the call to loadPolicyFile using 'http' will be futile since cross domain policies in case of socket connections need to be served over a socket on the target domain. This change has been recently made to the Flash Player (for details you can refer the white paper on Flash Player Security).
So, forget trying to do loadPolicyFile from the http location. Try and load the policy file using loadPolicyFile("xmlsocket://remote:6969");
If you are getting the cross-domain xml when you telnet to the remote machine then you need to check for one scenario mentioned in my comment on this post .
Hope this helps!