Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Flex accessing WebServices on deployed environment?

Posted on 2008-10-13
4
Medium Priority
?
443 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:westerlike
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
solntcev earned 2000 total points
ID: 22714106
Hello,
to use web-service your file "crossdomain.xml" must allow custom headers, use file in attachment as example.
<?xml version="1.0" ?> 
<cross-domain-policy>
  <site-control permitted-cross-domain-policies="all" /> 
  <allow-access-from domain="*" /> 
  <allow-http-request-headers-from domain="*" headers="*" /> 
</cross-domain-policy>

Open in new window

0
 
LVL 2

Expert Comment

by:solntcev
ID: 23187938
I think my answer is correct, to work with SOAP services Flex need allow rule for headers in crossdomain.xml
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question