Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7526095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:44:29+00:00 2026-05-30T03:44:29+00:00

I am quite new to Flex (virtually got tossed into it…lol). I am trying

  • 0

I am quite new to Flex (virtually got tossed into it…lol). I am trying to display the message that I have created in the web service. I keep getting the return error “Security error accessing url Destination: DefaultHTTP”

Here is a copy of my code…I know it may be something simple. I created the Data Service for configuring the HTTP Service and I tested the operation and everything was successful when testing…just having a little trouble showing

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/mx"
           xmlns:restsrv="services.restsrv.*"
           minWidth="955" minHeight="600" applicationComplete="init ()">

<fx:Declarations>

    <mx:HTTPService id="service" url="http://servername/RestService/Service.svc/XMLService/hi"  method="POST" resultFormat="e4x" />



    <restsrv:Restsrv id="restsrv"
                     fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
                     showBusyCursor="true"/>        
    <s:CallResponder id="RESTfulResult"/>
</fx:Declarations>

<fx:Script>
    <![CDATA[
        import mx.controls.Alert;
        import mx.events.FlexEvent;
        import mx.rpc.http.HTTPService;
        import mx.rpc.events.FaultEvent;
        import mx.rpc.events.ResultEvent;


        protected function form_creationCompleteHandler(event:FlexEvent):void
        {
            RESTfulResult.token = restsrv.RESTful();
            /* rESTfulTextInput.text = RESTfulResult.toString(); */
            service.send();                 
        }                   
    ]]>
</fx:Script>


<s:Form id="form" creationComplete="form_creationCompleteHandler(event)">
    <s:FormItem label="RESTful">
        <s:TextInput id="rESTfulTextInput" text="{RESTfulResult.lastResult as String}"/>
    </s:FormItem>
</s:Form>


</s:Application>

This is how the code looks when adding the correct syntax you suggested lxx

<?xml version="1.0" encoding="utf-8"?>

<cross-domain-policy>
<allow-access-from domain="http://my-server-name-dev3/RestService/Service.svc/XMLService/hi" />
</cross-domain-policy>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/mx"
           xmlns:restsrv="services.restsrv.*"
           minWidth="955" minHeight="600" applicationComplete="init ()">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:44:31+00:00Added an answer on May 30, 2026 at 3:44 am

    If you are not running this code also from http://servername you have same origin policy problem. You can solve it adding the client host to crossdomain.xml in server.

    For localhost for example you have to add

    <allow-access-from domain="localhost"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quite new to this but i have created a SQL script that groups by
I'm quite new to Flex. I've looked into taking screenshots in flex and have
I have been trying to get a list to display for quite a while
I'm quite experienced in XAML/WPF but am new to Flex/Flex4. I'm trying to build
I'm quite new to developing in Flex. I've found out that it's possible to
quite new to JQuery and Ive run into a problem. I have a form
Im quite new at this .....sorry in advance. I have created an app in
Being quite new to the web technologies in general, I have been trying to
I'm quite new to Flex and wondered if other developers actually use its stylesheet
Quite new to maven here so let me explain first what I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.