Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flex accessing WebServices on deployed environment?

Posted on 2008-10-13
4
Medium Priority
?
442 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
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…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 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