0
votes

I have google maps application in Flex.Whenever the map is clicked it calls a HTTPService internally. It is suppose to fetch data from google Rest web service in JSON format. But I am not able access the Web Service as I keep getting the error -

(mx.messaging.messages::ErrorMessage)#0
  body = (null)
  clientId = "DirectHTTPChannel0"
  correlationId = "2662EE9F-D349-806E-1D23-8BC4D0117C5E"
  destination = ""
  extendedData = (null)
  faultCode = "Channel.Security.Error"
  faultDetail = "Destination: DefaultHTTP"
  faultString = "Security error accessing url"
  headers = (Object)#1
    DSStatusCode = 0
  messageId = "124EF92C-AB10-2BB6-97F8-8BC4D0952DA4"
  rootCause = (flash.events::SecurityErrorEvent)#2
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#3
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#3
    text = "Error #2048"
    type = "securityError"
  timestamp = 0
  timeToLive = 0
2
Are you using the Google Maps Flex component? - Dane

2 Answers

0
votes

Your not allowed to fetch data from a seperate domain by default with flex.

One possible solution is to proxy the services you require on your own domain.

Note however that this makes it more expensive in bandwidth terms.

0
votes

This is a security feature of flash. What you'll need to do is edit your security settings.