Solved

Flex accessing WebServices on deployed environment?

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
network + 7 73
Linq help 1 16
Need help with a query 6 55
Object Oriented Best Practice 5 34
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now