Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Security Error when creating a web service with Flex

Former Member
0 Likes
682

Hello comminuty.

I'm using Flex to create a standalone application and I have to use web services to retrieve data from SAP.

I used the bapi bapi_flight_getlist to create an associated WS that works fine (tested with the Eclipse's WS Explorer).

In Flex Builder, I use the following code to create my web service:


	<mx:WebService
		showBusyCursor="true" 
		id="service" 		
		wsdl="{wsdl}"
		result="resultCreateWSHandler(event);"
		fault="faultCreateWSHandler(event);">
            <mx:operation name="FlightGetList" 
            	result="resultWSHandler(event)"
            	fault="faultWSHandler(event)"></mx:operation>		           
   	</mx:WebService>

And this is the error I'm getting:

(mx.messaging.messages::ErrorMessage)#0
  body = (null)
  clientId = "DirectHTTPChannel0"
  correlationId = "E578ED8C-EF29-44E7-8D57-57B4DB6EB613"
  destination = ""
  extendedData = (null)
  faultCode = "Channel.Security.Error"
  faultDetail = "Destination: DefaultHTTP"
  faultString = "Security error accessing url"
  headers = (Object)#1
    DSStatusCode = 0
  messageId = "6E7AC45E-418D-90CD-96AD-57B52DB1DAF4"
  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: Violation de la sécurité Sandbox : http://localhost:8300/ztest2/bin-debug/ztest2.swf ne peut pas charger de données à partir de http://XXXX:8006/sap/bc/srt/wsdl/bndg_DEB8A28C2E19EEF19C080050568D135B/wsdl11/allinone/ws_policy/document?sap-client=800."
    type = "securityError"
  timestamp = 0
  timeToLive = 0

Translation: "Error #2048: Sandbox security violation: http:....swf cannot load data from http:...client=800"

Would any of you have an idea about what is causing this error??

Thanks for any help you can provide.

Regards,

C.

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
571

Looks like a cross domain issue. search this forum (or google) with key word "flex crossdomain"

Regards

Raja

Looks like a cross domain issue. search this forum (or google) with key word "flex crossdomain"

Regards

Raja

3 REPLIES 3
Read only

athavanraja
Active Contributor
0 Likes
573

Looks like a cross domain issue. search this forum (or google) with key word "flex crossdomain"

Regards

Raja

Read only

0 Likes
571

Hi!

Thanks for your answer. I'll check this out

Regards,

C.

Read only

0 Likes
571

Hi Cristina

Did your flex application worked. i am also having same problm. cant access the BAPI from standalone flex application.

Jay