Link to home
Start Free TrialLog in
Avatar of westerlike
westerlike

asked on

Flex accessing WebServices on deployed environment?

Hi,

I have a web service and a flex application. Both are deployed to the same server. The Flex Application tries to call the webservice using:

<mx:WebService id="webService"
            wsdl="http://www.mydomain.com/Services/RoomService.asmx?WSDL"
            result="getRoomInfo_result(event)" >
</mx:WebService>

If I call this code locally it returns the info without any trouble. If I deploy it then it will return with an error:

[RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.mydomain.com/Services/RoomService.asmx"]. URL: http://www.mydomain.com/Services/RoomService.asmx"]

I have tried adding the crossdomain.xml file to the root of the webserver with a * as the allow domain. I also tried to add :
Security.allowDomain("www.mydomain.com");
to the first line of the mxml actionscript tag.

Nothing has worked. Please if someone out there knows how to get around this problem let me know since it is very annoying and I have spent over 3 days now trying to hunt down the reasons.

Miklos
ASKER CERTIFIED SOLUTION
Avatar of solntcev
solntcev
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I think my answer is correct, to work with SOAP services Flex need allow rule for headers in crossdomain.xml