This content has been marked as final. Show 1 reply
"hangcui" <email@example.com> wrote in message
> I'm new to flex and I've been suffering from the problem of using
> xmlsocket to
> connect to a standalone java server. Here is my goal - we have a java
> running on a machine listening to a port, say 55555. We need the flex
> application to connect to the java server to do some simple conversations
> a string and get back the response). All applications reside on the same
> machine. Here is the snippet for AS:
> var xmlsock:XMLSocket = new XMLSocket();
> xmlsock.connect("localhost", 55555);
> xmlsock.addEventListener(DataEvent.DATA, onResult);
> I do have a perl daemon running to send back the policy file. However, the
> problem is that my backend never gets anything from the flex app. The
> error I
> got is:
> rror #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security
> violation: http://www.mydomain.com/Flex/build/index.swf cannot load data
> at index/requestData()
> at index/___index_Button1_click()
> I even let my backend to send back the policy file if it gets
> "<policy-file-request/>". However, it hasn't got anything.
> I guess the problem could be either the security thing or xmlsocket
> connection. As for policy file, I know a lot of people have discussed it
> I've tried different approaches, like using xmlsocket and http to load the
> policy files. All of them didn't work.
> Could anyone give me a clue what is wrong here?
> Thanks a million in advance for any help!
This may or may not help http://www.gotoandlearn.com/play?id=69