Solved

Flex accessing WebServices on deployed environment?

Posted on 2008-10-13
4
436 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 500 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reseller Hosting 2 90
FTP file download using c# 3 23
.NET 2008 VB and C# 6 28
VB.NET 2008 Winforms Signing 13 18
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

773 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